Skip to content

fix: use existing attribute in Dialog instance#236

Merged
SpEcHiDe merged 1 commit into
TelegramPlayground:devfrom
gurland:patch-1
Apr 26, 2026
Merged

fix: use existing attribute in Dialog instance#236
SpEcHiDe merged 1 commit into
TelegramPlayground:devfrom
gurland:patch-1

Conversation

@gurland
Copy link
Copy Markdown
Contributor

@gurland gurland commented Apr 23, 2026

If .get_dialogs() is used an error on Dialog parsing occurs. This PR changes the typo in raw.types.Dialog.unread_poll_votes_count attribute access.

The error Traceback:

in get_all_chats
    async for dialog in app.get_dialogs():
  File "/home/admin/Projects/telegram-delete-all-messages/.venv/lib/python3.11/site-packages/pyrogram/methods/chats/get_dialogs.py", line 115, in get_dialogs
    parsed = types.Dialog._parse(self, dialog, messages, users, chats)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/Projects/telegram-delete-all-messages/.venv/lib/python3.11/site-packages/pyrogram/types/user_and_chats/dialog.py", line 112, in _parse
    unread_poll_vote_count=dialog.unread_poll_vote_count,
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Dialog' object has no attribute 'unread_poll_vote_count'. Did you mean: 'unread_poll_votes_count'?

@gurland
Copy link
Copy Markdown
Contributor Author

gurland commented May 15, 2026

@SpEcHiDe could you please release the upstream version? I really need that patch to be installable by users of my tool from PyPI and I heavily rely on .get_dialogs() method.

@SpEcHiDe
Copy link
Copy Markdown
Contributor

I was trying to implement the new layer changes in ( #239 ) and postpone releasing a new version, but I guess there are too many changes in the new layer.
I have pushed the 2.2.24 version now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants