Skip to content

Commit

Permalink
Fix ForumTopic._parse issue fr this time.
Browse files Browse the repository at this point in the history
Signed-off-by: Aliwoto <[email protected]>
  • Loading branch information
ALiwoto committed Jan 29, 2024
1 parent 73c223e commit ef24b77
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pyrogram/methods/chats/get_forum_topics_by_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,11 @@ async def get_forum_topics_by_id(
)

topics = types.List()
users = {u.id: u for u in getattr(r, "users", [])}
chats = {c.id: c for c in getattr(r, "chats", [])}
messages = {m.id: m for m in getattr(r, "messages", [])}

for current in getattr(r, "topics", []):
topics.append(types.ForumTopic._parse(self, current))
topics.append(types.ForumTopic._parse(self, current, messages, users, chats))

return topics if is_iterable else topics[0]

0 comments on commit ef24b77

Please sign in to comment.