-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix display name of new users #1682
Conversation
/backport to stable30 |
/backport to stable29 |
/backport to stable28 |
Wait, I messed it 🤦 Back to Developing, not ready for review yet. |
Although the display name of users is updated in a circle when it is changed in the user settings, the new display name was not shown if the user was then added to a circle due to a missing update of the member and, therefore, the cached name. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
0ffd9bc
to
3903094
Compare
Alright, ready for review now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice, works well. Thanks @danxuliu ❤️
Old accounts don't get updated by |
Well, that's a separate issue and can be tackled separately. |
Fixes nextcloud/contacts#3646
Although since #1648 the display name of users is updated in a circle when it is changed in the user settings, the new display name was not shown if the user was then added to a circle; when the display name is changed it needs to be updated both for the circles and the members, similarly to how it is done when updating the display name in the
MaintenanceService
.Originally this pull request had an additional commit to set the display name of the associated member based on the
IUser
API instead of the account data when a user was created; this was done on the basis that the user was updated after being created due to the avatar being generated, but that it was just a happy coincidence and the user should be properly set up from the beginning. But that was wrong 🤦 When theUserCreated
event is triggered the user does not even have a display name set, and theUserChanged
event is then triggered not only when the avatar is generated, but when the display name is actually set in the newly created user. Due to that the extra commit was dropped.How to test (scenario 1)
Result with this pull request
The display name of the user is shown in the circle
Result without this pull request
The id of the user is shown in the circle
How to test (scenario 2)
Result with this pull request
The display name of the user is shown in the circle
Result without this pull request
The id of the user is shown in the circle