Add Telegram display name to WHOIS for self user (me)
patch bee27c3c443c6fbca835bf662f253d2270c6d76a
Author: E. Bosch <presidev@AT@gmail.com>
Date: Sat Feb 5 03:30:31 CET 2022
* Add Telegram display name to WHOIS for self user (me)
hunk ./irc.py 332
- '{}!{}@Telegram'.format(self.tg.tg_username, self.tg.id
+ '{}|{}!{}@Telegram'.format(self.tg.tg_username,
+ await self.tg.get_telegram_display_name_me(), self.tg.id
hunk ./irc_replies.py 23
- 'RPL_WHOISACCOUNT': ('330', '{} {} :Telegram name'),
+ 'RPL_WHOISACCOUNT': ('330', '{} {} :has Telegram account'),
hunk ./telegram.py 134
+ async def get_telegram_display_name_me(self):
+ tg_user = await self.telegram_client.get_me()
+ return self.get_telegram_display_name(tg_user)
+