UNPKG

1.53 kBJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.RoomSummary = RoomSummary;
7
8/*
9Copyright 2015, 2016 OpenMarket Ltd
10Copyright 2019 The Matrix.org Foundation C.I.C.
11
12Licensed under the Apache License, Version 2.0 (the "License");
13you may not use this file except in compliance with the License.
14You may obtain a copy of the License at
15
16 http://www.apache.org/licenses/LICENSE-2.0
17
18Unless required by applicable law or agreed to in writing, software
19distributed under the License is distributed on an "AS IS" BASIS,
20WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21See the License for the specific language governing permissions and
22limitations under the License.
23*/
24
25/**
26 * @module models/room-summary
27 */
28
29/**
30 * Construct a new Room Summary. A summary can be used for display on a recent
31 * list, without having to load the entire room list into memory.
32 * @constructor
33 * @param {string} roomId Required. The ID of this room.
34 * @param {Object} info Optional. The summary info. Additional keys are supported.
35 * @param {string} info.title The title of the room (e.g. <code>m.room.name</code>)
36 * @param {string} info.desc The description of the room (e.g.
37 * <code>m.room.topic</code>)
38 * @param {Number} info.numMembers The number of joined users.
39 * @param {string[]} info.aliases The list of aliases for this room.
40 * @param {Number} info.timestamp The timestamp for this room.
41 */
42function RoomSummary(roomId, info) {
43 this.roomId = roomId;
44 this.info = info;
45}
\No newline at end of file