fix: Properly sync left rooms

- Remove most usages of `update_membership` in favor
  of directly calling the `mark_as_*` functions
- Store the leave membership event as the value in the
  `userroomid_leftstate` table
- Use the `userroomid_leftstate` table to synchronize the
  timeline and state for left rooms if possible
This commit is contained in:
Ginger
2025-10-27 17:24:02 -04:00
parent fceaaedc04
commit 1c21e4af6e
14 changed files with 759 additions and 665 deletions
+3 -2
View File
@@ -908,7 +908,7 @@ where
false
}
},
| JoinRule::Restricted(_) =>
| JoinRule::Restricted(_) => {
if membership_allows_join || user_for_join_auth_is_valid {
trace!(
%sender,
@@ -928,7 +928,8 @@ where
valid authorising user given to permit the join"
);
false
},
}
},
| JoinRule::Public => {
trace!(%sender, "join rule is public, allowing join");
true