mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-06 15:30:27 +03:00
add a generic getKnownRooms
This commit is contained in:
parent
93a1401b7c
commit
b59a5ac307
1 changed files with 2 additions and 4 deletions
|
|
@ -405,7 +405,7 @@ export class SmallWidgetDriver extends WidgetDriver {
|
||||||
const state = room.getLiveTimeline().getState(Direction.Forward);
|
const state = room.getLiveTimeline().getState(Direction.Forward);
|
||||||
if (state === undefined) return [];
|
if (state === undefined) return [];
|
||||||
|
|
||||||
if (stateKey === undefined)
|
if (stateKey === undefined)
|
||||||
return state.getStateEvents(eventType).map((e) => e.getEffectiveEvent() as IRoomEvent);
|
return state.getStateEvents(eventType).map((e) => e.getEffectiveEvent() as IRoomEvent);
|
||||||
const event = state.getStateEvents(eventType, stateKey);
|
const event = state.getStateEvents(eventType, stateKey);
|
||||||
return event === null ? [] : [event.getEffectiveEvent() as IRoomEvent];
|
return event === null ? [] : [event.getEffectiveEvent() as IRoomEvent];
|
||||||
|
|
@ -500,13 +500,11 @@ export class SmallWidgetDriver extends WidgetDriver {
|
||||||
* client.
|
* client.
|
||||||
* @returns The room IDs.
|
* @returns The room IDs.
|
||||||
*/
|
*/
|
||||||
/*
|
|
||||||
public getKnownRooms(): string[] {
|
public getKnownRooms(): string[] {
|
||||||
return this.mxClient
|
return this.mxClient
|
||||||
.getVisibleRooms(SettingsStore.getValue("feature_dynamic_room_predecessors"))
|
.getVisibleRooms()
|
||||||
.map((r) => r.roomId);
|
.map((r) => r.roomId);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Expresses a {@link MatrixError} as a JSON payload
|
* Expresses a {@link MatrixError} as a JSON payload
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue