Skip to content
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

Ensure display name changes are logged to the user-log #505

Merged
merged 2 commits into from Oct 9, 2019

Conversation

@SebastiaanZ
Copy link
Member

commented Oct 8, 2019

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 in which either the old_value or the new_value is None, we did not log these None->nick or nick->None events.

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:

display name logging

This PR closes #489

#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
sco1 approved these changes Oct 8, 2019
@MarkKoz
MarkKoz approved these changes Oct 9, 2019
@MarkKoz MarkKoz merged commit f7d727c into master Oct 9, 2019
2 checks passed
2 checks passed
Bot Build #20191009.2 succeeded
Details
Bot (Lint & Test) Lint & Test succeeded
Details
@MarkKoz MarkKoz deleted the user-log-display-name-changes branch Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.