Skip to content

Commit

Permalink
Fix for get_last_messages
Browse files Browse the repository at this point in the history
  • Loading branch information
onuratakan committed Apr 14, 2024
1 parent ef988e7 commit 123b743
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ async def get_messages(num, limit):
number = ""
type_of_entity = ""
try:
number = (await client.get_entity(each_ms.peer_id.user_id)).phone
number = (await client.get_entity(each_ms.peer_id)).phone
type_of_entity = "user"
except:
try:
number = (await client.get_entity(each_ms.peer_id.user_id)).username
number = (await client.get_entity(each_ms.peer_id)).username
type_of_entity = "channel"
except:
number = (await client.get_entity(each_ms.peer_id.user_id)).id
number = (await client.get_entity(each_ms.peer_id)).id
type_of_entity = "group"

the_messages_list[each_ms.id] = {
Expand Down

0 comments on commit 123b743

Please sign in to comment.