mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-07 15:08:24 +00:00
Add ExtraApi#getVisibleRoomBySpaceKey (#134)
This commit is contained in:
@@ -167,6 +167,7 @@ export interface DirectoryCustomisations {
|
|||||||
|
|
||||||
// @alpha
|
// @alpha
|
||||||
export interface ExtrasApi {
|
export interface ExtrasApi {
|
||||||
|
getVisibleRoomBySpaceKey(spaceKey: string, cb: () => string[]): void;
|
||||||
setSpacePanelItem(spaceKey: string, props: SpacePanelItemProps): void;
|
setSpacePanelItem(spaceKey: string, props: SpacePanelItemProps): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,4 +56,15 @@ export interface ExtrasApi {
|
|||||||
* @param props - Properties of the item to add.
|
* @param props - Properties of the item to add.
|
||||||
*/
|
*/
|
||||||
setSpacePanelItem(spaceKey: string, props: SpacePanelItemProps): void;
|
setSpacePanelItem(spaceKey: string, props: SpacePanelItemProps): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Registers a callback to get the list of visible rooms for a given space.
|
||||||
|
*
|
||||||
|
* Element Web will call this callback when checking if a room is displayed for the given space. For example in case of message editing or replying.
|
||||||
|
* If the space added by the module displays a room view and doesn't provide this callback, Element Web won't be able to determine if a room is visible in that space and will redirect to display the room in its vanilla space/metaspace.
|
||||||
|
*
|
||||||
|
* @param spaceKey - The space key to get visible rooms for.
|
||||||
|
* @param cb - A callback that returns the list of visible room IDs.
|
||||||
|
*/
|
||||||
|
getVisibleRoomBySpaceKey(spaceKey: string, cb: () => string[]): void;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user