Initial solution and database update for #11

The database now contains a displayname_source field which is the
telegram user ID of the user whose point of view the displayname
is from.

Updates from the relaybot user always take precendence, but currently
the relaybot will never automatically fetch displaynames.
This commit is contained in:
Tulir Asokan
2018-05-19 17:16:42 +03:00
parent 0833850f4f
commit 1f5261ff8f
5 changed files with 45 additions and 5 deletions
+1
View File
@@ -41,6 +41,7 @@ class Bot(AbstractUser):
self.token = token
self.whitelisted = True
self.username = None
self.is_relaybot = True
self.chats = {chat.id: chat.type for chat in BotChat.query.all()}
self.tg_whitelist = []
self.whitelist_group_admins = config["bridge.relaybot.whitelist_group_admins"] or False