[FIX] other retrieving method for supergroup users nicknames
This commit is contained in:
@@ -158,13 +158,8 @@ class TelegramGateClient(TelegramClient):
|
||||
|
||||
# get sender information from chat info #
|
||||
if not is_user and not obj.message.post:
|
||||
if obj.message.from_id not in self._groups_users:
|
||||
|
||||
chat = self.invoke(GetFullChatRequest(cid)) if is_group else self.invoke(GetParticipantRequest(peer, self.me))
|
||||
for usr in chat.users:
|
||||
self._groups_users[usr.id] = usr
|
||||
|
||||
nickname = display_tg_name(self._groups_users[obj.message.from_id].first_name, self._groups_users[obj.message.from_id].last_name)
|
||||
usr = self._get_user_information(obj.message.from_id)
|
||||
nickname = display_tg_name(usr.first_name, usr.last_name)
|
||||
msg = '[User: {}] {}'.format(nickname, msg)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user