diff --git a/changelog.d/19791.bugfix b/changelog.d/19791.bugfix new file mode 100644 index 0000000000..003716d296 --- /dev/null +++ b/changelog.d/19791.bugfix @@ -0,0 +1 @@ +Fix a bug in [MSC4186: Simplified Sliding Sync](https://github.com/matrix-org/matrix-spec-proposals/pull/4186) that could prevent user avatars from showing if the room had an empty name. diff --git a/synapse/handlers/sliding_sync/__init__.py b/synapse/handlers/sliding_sync/__init__.py index df1270f7f9..4d6287b147 100644 --- a/synapse/handlers/sliding_sync/__init__.py +++ b/synapse/handlers/sliding_sync/__init__.py @@ -966,7 +966,7 @@ class SlidingSyncHandler: # care to treat an empty string as unset). But we only need to get them # on initial syncs (or the first time we send down the room) or if the # membership has changed which may change the heroes. - if not room_name and (initial or (not initial and membership_changed)): + if not room_name and (initial or membership_changed): # We need the room summary to extract the heroes from if room_membership_for_user_at_to_token.membership != Membership.JOIN: # TODO: Figure out how to get the membership summary for left/banned rooms @@ -1185,8 +1185,6 @@ class SlidingSyncHandler: (EventTypes.Member, hero_user_id) for hero_user_id in hero_user_ids ] meta_room_state = list(hero_room_state) - if initial or name_changed: - meta_room_state.append((EventTypes.Name, "")) if initial or avatar_changed: meta_room_state.append((EventTypes.RoomAvatar, ""))