Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ChatIdInvalidError should not prevent sync chats from working #358

Closed
turt2live opened this issue Aug 22, 2019 · 1 comment
Closed

ChatIdInvalidError should not prevent sync chats from working #358

turt2live opened this issue Aug 22, 2019 · 1 comment
Labels
bug: defect Something isn't working and it never has worked
Milestone

Comments

@turt2live
Copy link
Contributor

Aug 22 15:06:25 integrations python[11187]: [2019-08-22 15:06:25,548] [[email protected]] Unhandled error while handling command sync chats from @redacted:example.org
Aug 22 15:06:25 integrations python[11187]: Traceback (most recent call last):
Aug 22 15:06:25 integrations python[11187]:   File "/home/telegram/tgenv/lib/python3.6/site-packages/mautrix_telegram/commands/handler.py", line 352, in handle
Aug 22 15:06:25 integrations python[11187]:     await handler(evt)
Aug 22 15:06:25 integrations python[11187]:   File "/home/telegram/tgenv/lib/python3.6/site-packages/mautrix_telegram/commands/handler.py", line 274, in __call__
Aug 22 15:06:25 integrations python[11187]:     return await self._handler(evt)
Aug 22 15:06:25 integrations python[11187]:   File "/home/telegram/tgenv/lib/python3.6/site-packages/mautrix_telegram/commands/telegram/misc.py", line 162, in sync
Aug 22 15:06:25 integrations python[11187]:     await evt.sender.sync_dialogs(synchronous_create=True)
Aug 22 15:06:25 integrations python[11187]:   File "/home/telegram/tgenv/lib/python3.6/site-packages/mautrix_telegram/user.py", line 306, in sync_dialogs
Aug 22 15:06:25 integrations python[11187]:     await asyncio.gather(*creators, loop=self.loop)
Aug 22 15:06:25 integrations python[11187]:   File "/home/telegram/tgenv/lib/python3.6/site-packages/mautrix_telegram/portal.py", line 349, in create_matrix_room
Aug 22 15:06:25 integrations python[11187]:     return await self._create_matrix_room(user, entity, invites)
Aug 22 15:06:25 integrations python[11187]:   File "/home/telegram/tgenv/lib/python3.6/site-packages/mautrix_telegram/portal.py", line 394, in _create_matrix_room
Aug 22 15:06:25 integrations python[11187]:     users, participants = await self._get_users(user, entity)
Aug 22 15:06:25 integrations python[11187]:   File "/home/telegram/tgenv/lib/python3.6/site-packages/mautrix_telegram/portal.py", line 685, in _get_users
Aug 22 15:06:25 integrations python[11187]:     chat = await user.client(GetFullChatRequest(chat_id=self.tgid))
Aug 22 15:06:25 integrations python[11187]:   File "/home/telegram/tgenv/lib/python3.6/site-packages/telethon/client/users.py", line 64, in __call__
Aug 22 15:06:25 integrations python[11187]:     result = await future
Aug 22 15:06:25 integrations python[11187]: telethon.errors.rpcerrorlist.ChatIdInvalidError: Invalid object ID for a chat. Make sure to pass the right types, for instance making sure that the request is designed for chats (not channels/megagroups) or otherwise look for a different one more suited\nAn example working with a megagroup and AddChatUserRequest, it will fail because megagroups are channels. Use InviteToChannelRequest instead (caused by GetFullChatRequest)

It might want to warn that a room wasn't updated, but it shouldn't prevent all other rooms from updating.

@tulir tulir added the bug: defect Something isn't working and it never has worked label Aug 22, 2019
@tulir tulir added this to the 0.7.0 milestone Aug 25, 2019
@tulir
Copy link
Member

tulir commented Sep 2, 2019

Looks like this was already fixed at some point earlier.

@tulir tulir closed this as completed Sep 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: defect Something isn't working and it never has worked
Development

No branches or pull requests

2 participants