From 80733a8cee0c6b51022ffd23b20eab216f0efd0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Wed, 14 Dec 2022 16:14:05 +0100 Subject: [PATCH] events: Fix matching of rejected and revoked invitation --- crates/ruma-common/src/events/room/member/change.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ruma-common/src/events/room/member/change.rs b/crates/ruma-common/src/events/room/member/change.rs index 8513b114..2c776929 100644 --- a/crates/ruma-common/src/events/room/member/change.rs +++ b/crates/ruma-common/src/events/room/member/change.rs @@ -122,8 +122,8 @@ pub(super) fn membership_change<'a>( | (St::Knock, St::Knock) => Ch::None, (St::Leave, St::Join) => Ch::Joined, (St::Invite, St::Join) => Ch::InvitationAccepted, - (St::Invite, St::Leave) if sender == state_key => Ch::InvitationRevoked, - (St::Invite, St::Leave) => Ch::InvitationRejected, + (St::Invite, St::Leave) if sender == state_key => Ch::InvitationRejected, + (St::Invite, St::Leave) => Ch::InvitationRevoked, (St::Invite, St::Ban) | (St::Leave, St::Ban) | (St::Knock, St::Ban) => Ch::Banned, (St::Join, St::Invite) | (St::Ban, St::Invite)