Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Server notice user's avatar and displayname are only set on initial creation of the user #7494

@anoadragon453

Description

@anoadragon453

If you've already created a server notices user, say with the following config:

server_notices:
  system_mxid_localpart: 'notices'
  system_mxid_display_name: 'Server Notices'
  system_mxid_avatar_url: 'mxc://example.com/abcde12345'
  room_name: 'Server Notices'

change either system_mxid_display_name or system_mxid_avatar_url will not update the user's avatar or display name. These are only set on initial creation of the user, thus changing system_mxid_localpart will apply the changes, but in the process create a new user.

The code for setting the displayname and avatar is:

# apparently no existing notice room: create a new one
logger.info("Creating server notices room for %s", user_id)
# see if we want to override the profile info for the server user.
# note that if we want to override either the display name or the
# avatar, we have to use both.
join_profile = None
if (
self._config.server_notices_mxid_display_name is not None
or self._config.server_notices_mxid_avatar_url is not None
):
join_profile = {
"displayname": self._config.server_notices_mxid_display_name,
"avatar_url": self._config.server_notices_mxid_avatar_url,
}

Instead, Synapse should check to see if the displayname or avatar has changed after a server restart, and update them accordingly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-EnhancementNew features, changes in functionality, improvements in performance, or user-facing enhancements.good first issueGood for newcomersz-p3(Deprecated Label)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions