matrix-appservice-discord
matrix-appservice-discord copied to clipboard
Apply nick pattern to user updates
When a nickname is updated for a user, and it isn't updated as a GuildMember object, we fail to apply the nick pattern to the Matrix nickname for the ghost user. By using the same logic as the GetUserStateForGuildMember in GetUserStateForDiscordUser, the nickname should now match the nickname pattern. Hopefully this will cut back on nickname changes being echoed out in Matrix channels, when no changes were made in the first place. At the very least, if a prefix/suffix is added to usernames, those should remain on the user at all times now.