Add command to set username and fix some bugs

This commit is contained in:
Tulir Asokan
2018-12-19 22:36:51 +02:00
parent d3d02f173a
commit 65e0ebdb37
3 changed files with 37 additions and 6 deletions
+1
View File
@@ -271,6 +271,7 @@ class AbstractUser(ABC):
# TODO duplication not checked
puppet = pu.Puppet.get(TelegramID(update.user_id))
if isinstance(update, UpdateUserName):
puppet.username = update.username
if await puppet.update_displayname(self, update):
puppet.save()
elif isinstance(update, UpdateUserPhoto):