Skip to content

Commit

Permalink
Fix new invite not showing in memberlist
Browse files Browse the repository at this point in the history
  • Loading branch information
MidhunSureshR committed Dec 17, 2024
1 parent c220848 commit b5c8051
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/viewmodels/MemberListViewModel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export function useMemberListViewModel(roomId: string): MemberListViewState {
inviteToRoom(room);
};

useTypedEventEmitter(cli, RoomStateEvent.Update, (event: MatrixEvent) => {
useTypedEventEmitter(cli, RoomStateEvent.Events, (event: MatrixEvent) => {
if (event.getRoomId() === roomId && event.getType() === EventType.RoomThirdPartyInvite) loadMembers();
const newCanInvite = getCanUserInviteToThisRoom();
setCanInvite(newCanInvite);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ describe("MemberListView and MemberlistHeaderView", () => {

async function reRenderMemberList(): Promise<void> {
await act(async () => {
client.emit(RoomStateEvent.Update, {
//@ts-ignore
client.emit(RoomStateEvent.Events, {
//@ts-ignore
getType: () => EventType.RoomThirdPartyInvite,
getRoomId: () => memberListRoom.roomId,
Expand Down

0 comments on commit b5c8051

Please sign in to comment.