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:
@@ -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": {
|
||||
|
||||
Reference in New Issue
Block a user