mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-07 06:58:25 +00:00
Introduce an abstraction for Room
All APIs that need to return a room will use this type.
This commit is contained in:
@@ -10,6 +10,7 @@ export type { Api, Module, ModuleFactory } from "./api";
|
|||||||
export type { Config, ConfigApi } from "./api/config";
|
export type { Config, ConfigApi } from "./api/config";
|
||||||
export type { I18nApi, Variables, Translations } from "./api/i18n";
|
export type { I18nApi, Variables, Translations } from "./api/i18n";
|
||||||
export type * from "./models/event";
|
export type * from "./models/event";
|
||||||
|
export type * from "./models/Room";
|
||||||
export type * from "./api/custom-components";
|
export type * from "./api/custom-components";
|
||||||
export type * from "./api/extras";
|
export type * from "./api/extras";
|
||||||
export type * from "./api/legacy-modules";
|
export type * from "./api/legacy-modules";
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2025 New Vector Ltd.
|
||||||
|
|
||||||
|
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||||
|
Please see LICENSE files in the repository root for full details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { Watchable } from "../api/watchable";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents a room from element-web.
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
export interface Room {
|
||||||
|
/**
|
||||||
|
* Id of this room.
|
||||||
|
*/
|
||||||
|
id: string;
|
||||||
|
/**
|
||||||
|
* {@link Watchable} holding the name for this room.
|
||||||
|
*/
|
||||||
|
name: Watchable<string>;
|
||||||
|
/**
|
||||||
|
* Get the timestamp of the last message in this room.
|
||||||
|
* @returns last active timestamp
|
||||||
|
*/
|
||||||
|
getLastActiveTimestamp: () => number;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user