Skip to content
This repository has been 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

Closed
anoadragon453 opened this issue May 13, 2020 · 6 comments · Fixed by #12115
Labels
good first issue Good for newcomers T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements. z-p3 (Deprecated Label)

Comments

@anoadragon453
Copy link
Member

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.

@arya2331
Copy link
Contributor

hey, can I work on this issue if someone is not working already?

@ShadowJonathan
Copy link
Contributor

hey, can I work on this issue if someone is not working already?

Of course! Go ahead! :D

@arya2331
Copy link
Contributor

@ShadowJonathan How should I start with this?

@ShadowJonathan
Copy link
Contributor

You could give a look at the documentation (CONTRIBUTING.md) and maybe join the dev channel, #synapse-dev:matrix.org

@erikjohnston erikjohnston added T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements. and removed z-enhancement labels Jul 26, 2021
@Rachit-Gandhi
Copy link

Can I also work on this issue? If it's still open that is.

@dklimpel
Copy link
Contributor

Yes, I have not seen any PR for this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements. z-p3 (Deprecated Label)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants