Skip to content
This repository has been archived by the owner on Oct 24, 2018. It is now read-only.

Fix the wrong displayname/avatar change messages (maybe) #45

Closed
wants to merge 1 commit into from

Conversation

vurpo
Copy link
Contributor

@vurpo vurpo commented Oct 30, 2017

This PR might fix #42 (not sure if I fixed the logic that caused it, but I fixed something, at least).

msg = '> {} changed their display name to {}'\
.format(oldname, displayname)
print("DEBUG: {}".format(event))
if ('unsigned' in event and 'prev_content' in event['unsigned']) or 'prev_content' in event:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You seem to be checking for the same thing multiple times, mind rewriting this if statement to be a bit more efficient?

@vurpo
Copy link
Contributor Author

vurpo commented Nov 1, 2017

I just noticed that this didn't fix the bug after all, it still did the thing when I changed my avatar

@vurpo
Copy link
Contributor Author

vurpo commented Nov 1, 2017

For some reason when changing my avatar, it sends an "joined the room" message even though it should recognize that the previous state was already "join".

@vurpo vurpo closed this Nov 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Display name and avatar changes are considered "x has joined the room"
2 participants