This repository was archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Copy link
Copy link
Closed
Labels
T-EnhancementNew features, changes in functionality, improvements in performance, or user-facing enhancements.New features, changes in functionality, improvements in performance, or user-facing enhancements.good first issueGood for newcomersGood for newcomersz-p3(Deprecated Label)(Deprecated Label)
Description
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:
synapse/synapse/server_notices/server_notices_manager.py
Lines 125 to 139 in 28c98e5
# 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.
ptman, 0xC0ncord, Quallenauge, samuel-p, dklimpel and 2 more
Metadata
Metadata
Assignees
Labels
T-EnhancementNew features, changes in functionality, improvements in performance, or user-facing enhancements.New features, changes in functionality, improvements in performance, or user-facing enhancements.good first issueGood for newcomersGood for newcomersz-p3(Deprecated Label)(Deprecated Label)