mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 03:36:07 +03:00
Merge pull request #6062 from matrix-org/t3chguy/fix/17280
Show DMs in space for invited members too, to match Android impl
This commit is contained in:
commit
a9d0699488
2 changed files with 3 additions and 1 deletions
|
@ -361,7 +361,8 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
|
||||||
const space = this.matrixClient?.getRoom(spaceId);
|
const space = this.matrixClient?.getRoom(spaceId);
|
||||||
|
|
||||||
// Add relevant DMs
|
// Add relevant DMs
|
||||||
space?.getJoinedMembers().forEach(member => {
|
space?.getMembers().forEach(member => {
|
||||||
|
if (member.membership !== "join" && member.membership !== "invite") return;
|
||||||
DMRoomMap.shared().getDMRoomsForUserId(member.userId).forEach(roomId => {
|
DMRoomMap.shared().getDMRoomsForUserId(member.userId).forEach(roomId => {
|
||||||
roomIds.add(roomId);
|
roomIds.add(roomId);
|
||||||
});
|
});
|
||||||
|
|
|
@ -234,6 +234,7 @@ export function mkStubRoom(roomId = null) {
|
||||||
}),
|
}),
|
||||||
getMembersWithMembership: jest.fn().mockReturnValue([]),
|
getMembersWithMembership: jest.fn().mockReturnValue([]),
|
||||||
getJoinedMembers: jest.fn().mockReturnValue([]),
|
getJoinedMembers: jest.fn().mockReturnValue([]),
|
||||||
|
getMembers: jest.fn().mockReturnValue([]),
|
||||||
getPendingEvents: () => [],
|
getPendingEvents: () => [],
|
||||||
getLiveTimeline: () => stubTimeline,
|
getLiveTimeline: () => stubTimeline,
|
||||||
getUnfilteredTimelineSet: () => null,
|
getUnfilteredTimelineSet: () => null,
|
||||||
|
|
Loading…
Reference in a new issue