room list service: add $ME as a required state for the all_rooms sliding sync list

Without this, we wouldn't ever have the member information for the logged-in user, the first time they log in, if they don't happen to be the
last user sending a message in a room (a case covered by `$LAZY`).
This commit is contained in:
Benjamin Bouvier
2024-01-18 16:29:22 +01:00
parent b3f4e658c5
commit 20b97fc716
3 changed files with 3 additions and 0 deletions
+1
View File
@@ -1233,6 +1233,7 @@ impl BaseClient {
} else if let Some(member) = Box::pin(room.get_member(user_id)).await? {
member.name().to_owned()
} else {
trace!("Couldn't get push context because of missing own member information");
return Ok(None);
};
@@ -178,6 +178,7 @@ impl RoomListService {
(StateEventType::RoomAvatar, "".to_owned()),
(StateEventType::RoomEncryption, "".to_owned()),
(StateEventType::RoomMember, "$LAZY".to_owned()),
(StateEventType::RoomMember, "$ME".to_owned()),
(StateEventType::RoomPowerLevels, "".to_owned()),
]),
))
@@ -275,6 +275,7 @@ async fn test_sync_all_states() -> Result<(), Error> {
["m.room.avatar", ""],
["m.room.encryption", ""],
["m.room.member", "$LAZY"],
["m.room.member", "$ME"],
["m.room.power_levels", ""],
],
"filters": {