Skip to content

Commit

Permalink
Trust displaynames from non-contacts when syncing puppets
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Dec 25, 2019
1 parent 6f6ce4b commit 50984da
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mautrix_telegram/puppet.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,8 @@ async def update_displayname(self, source: 'AbstractUser', info: Union[User, Upd
return False
allow_source = (source.is_relaybot
or self.displayname_source == source.tgid
# User is not a contact, so there's no custom name
or not info.contact
# No displayname source, so just trust anything
or self.displayname_source is None)
if not allow_source:
Expand Down

0 comments on commit 50984da

Please sign in to comment.