Flag & add some debugging
This commit is contained in:
parent
0b6f744a58
commit
18df29b627
1 changed files with 4 additions and 0 deletions
|
@ -641,11 +641,15 @@ export class Algorithm extends EventEmitter {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cause === RoomUpdateCause.NewRoom && !this.roomIdsToTags[room.roomId]) {
|
if (cause === RoomUpdateCause.NewRoom && !this.roomIdsToTags[room.roomId]) {
|
||||||
|
// TODO: Remove debug: https://github.com/vector-im/riot-web/issues/14035
|
||||||
console.log(`[RoomListDebug] Updating tags for new room ${room.roomId} (${room.name})`);
|
console.log(`[RoomListDebug] Updating tags for new room ${room.roomId} (${room.name})`);
|
||||||
|
|
||||||
// Get the tags for the room and populate the cache
|
// Get the tags for the room and populate the cache
|
||||||
const roomTags = this.getTagsForRoom(room).filter(t => !isNullOrUndefined(this.cachedRooms[t]));
|
const roomTags = this.getTagsForRoom(room).filter(t => !isNullOrUndefined(this.cachedRooms[t]));
|
||||||
|
|
||||||
|
// TODO: Remove debug: https://github.com/vector-im/riot-web/issues/14035
|
||||||
|
console.log(`[RoomListDebug] Updated tags for ${room.roomId}:`, roomTags);
|
||||||
|
|
||||||
// "This should never happen" condition - we specify DefaultTagID.Untagged in getTagsForRoom(),
|
// "This should never happen" condition - we specify DefaultTagID.Untagged in getTagsForRoom(),
|
||||||
// which means we should *always* have a tag to go off of.
|
// which means we should *always* have a tag to go off of.
|
||||||
if (!roomTags.length) throw new Error(`Tags cannot be determined for ${room.roomId}`);
|
if (!roomTags.length) throw new Error(`Tags cannot be determined for ${room.roomId}`);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue