consider membership change with reason change (#1441)

This commit is contained in:
Ajay Bura 2023-10-08 16:35:16 +11:00 committed by GitHub
parent bffd27ae5b
commit 60b5b5d312
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 4 deletions

View file

@ -278,6 +278,10 @@ export const getMemberAvatarMxc = (room: Room, userId: string): string | undefin
return member?.getMxcAvatarUrl();
};
export const isMembershipChanged = (mEvent: MatrixEvent): boolean =>
mEvent.getContent().membership !== mEvent.getPrevContent().membership ||
mEvent.getContent().reason !== mEvent.getPrevContent().reason;
export const decryptAllTimelineEvent = async (mx: MatrixClient, timeline: EventTimeline) => {
const crypto = mx.getCrypto();
if (!crypto) return;