mirror of https://github.com/vector-im/riot-web
Fix peeked rooms showing up in historical (#11316)
parent
b5cbd9eeca
commit
c57a4cb090
|
@ -548,6 +548,8 @@ export class Algorithm extends EventEmitter {
|
|||
const tags: TagID[] = [];
|
||||
|
||||
const membership = getEffectiveMembership(room.getMyMembership());
|
||||
if (!membership) return []; // peeked room has no tags
|
||||
|
||||
if (membership === EffectiveMembership.Invite) {
|
||||
tags.push(DefaultTagID.Invite);
|
||||
} else if (membership === EffectiveMembership.Leave) {
|
||||
|
|
|
@ -56,7 +56,11 @@ export function splitRoomsByMembership(rooms: Room[]): MembershipSplit {
|
|||
};
|
||||
|
||||
for (const room of rooms) {
|
||||
split[getEffectiveMembership(room.getMyMembership())].push(room);
|
||||
const membership = room.getMyMembership();
|
||||
// Filter out falsey relationship as this will be peeked rooms
|
||||
if (!!membership) {
|
||||
split[getEffectiveMembership(membership)].push(room);
|
||||
}
|
||||
}
|
||||
|
||||
return split;
|
||||
|
|
Loading…
Reference in New Issue