Skip to content

Commit

Permalink
Fix get_forum_topics_by_id issue (Fixes #2).
Browse files Browse the repository at this point in the history
Fix session not getting properly cached.
Fix github issue template.

Signed-off-by: Aliwoto <[email protected]>
  • Loading branch information
ALiwoto committed Jan 28, 2024
1 parent 5edabf0 commit ff3b905
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ body:
required: true
- label: I have searched in the issue tracker for similar bug reports, including closed ones
required: true
- label: I ran `pip3 install -U https://github.com/pyrogram/pyrogram/archive/master.zip` and reproduced the issue using the latest development version
- label: I ran `pip3 install -U WPyrogram` and reproduced the issue using the latest development version
required: true

- type: textarea
Expand Down
2 changes: 1 addition & 1 deletion pyrogram/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>

__version__ = "2.0.137"
__version__ = "2.0.138"
__license__ = "GNU Lesser General Public License v3.0 (LGPL-3.0)"
__copyright__ = "Copyright (C) 2017-present Dan <https://github.com/delivrance>"

Expand Down
2 changes: 1 addition & 1 deletion pyrogram/methods/advanced/save_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ async def worker(session):
async with self.media_sessions_lock:
session = self.media_sessions.get(dc_id)
if not session:
session = Session(
session = self.media_sessions[dc_id] = Session(
self, dc_id, await self.storage.auth_key(),
await self.storage.test_mode(), is_media=True
)
Expand Down
4 changes: 2 additions & 2 deletions pyrogram/methods/chats/get_forum_topics_by_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ async def get_forum_topics_by_id(

topics = types.List()

for i in r:
topics.append(types.ForumTopic._parse(i))
for current in getattr(r, "topics", []):
topics.append(types.ForumTopic._parse(current))

return topics if is_iterable else topics[0]

0 comments on commit ff3b905

Please sign in to comment.