Ensure display name changes are logged to the user-log#505
Merged
Conversation
#489 Recently, we discovered that not all display name changes were logged to the #user-log channel. This problem was caused by the `old_value` or the `new_value` showing up as `None` when a user sets or removes a guild-specific nickname. Since we ignore changes where one of the two values is `None`, we did not log these `None->nick` or `nick->None` events. Since we are mainly interested in the display name of the user, and the display name is equal to the user's guild-specific nickname if they have set one and otherwise their username, I made the following changes: - Add logging of changes in the display names of members. - Ignore nick-specific changes completely, since these changes are already captured by the changes in the display name we now log. This closes #489
sco1
approved these changes
Oct 8, 2019
MarkKoz
approved these changes
Oct 9, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Recently, we discovered that not all display name changes were logged to the #user-log channel. This problem was caused by the
old_valueor thenew_valueshowing up asNonewhen a user sets or removes a guild-specific nickname. Since we ignore changes in which either theold_valueor thenew_valueisNone, we did not log theseNone->nickornick->Noneevents.As we are mainly interested in the display name of the user, and the display name is either equal to the user's guild-specific nickname, if they have one, or otherwise their username, I made the following changes:
Add logging of changes in the display names of members.
Ignore nick-specific changes completely, since these changes are already captured by the changes in the display name we now log.
The new display name logs will show up in #user-log as this:
This PR closes #489