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

Appending a slash to the end of a join link causes command to fail #554

Closed
anoadragon453 opened this issue Dec 10, 2020 · 0 comments
Closed
Labels
enhancement New feature or improvement
Milestone

Comments

@anoadragon453
Copy link
Contributor

I tried to join a room via an invite link yesterday -> join https://t.me/someroom/

And received the following stacktrace error:

Traceback (most recent call last):
  File "/home/synapse/bridges/mautrix-telegram/env/lib/python3.8/site-packages/mautrix/bridge/commands/handler.py", line 405, in handle
    await self._run_handler(handler, evt)
  File "/home/synapse/bridges/mautrix-telegram/mautrix_telegram/commands/handler.py", line 121, in _run_handler
    return await handler(evt)
  File "/home/synapse/bridges/mautrix-telegram/env/lib/python3.8/site-packages/mautrix/bridge/commands/handler.py", line 290, in __call__
    return await self._handler(evt)
  File "/home/synapse/bridges/mautrix-telegram/mautrix_telegram/commands/telegram/misc.py", line 154, in join
    updates, _ = await _join(evt, arg.group(1))
  File "/home/synapse/bridges/mautrix-telegram/mautrix_telegram/commands/telegram/misc.py", line 136, in _join
    channel = await evt.sender.client.get_entity(arg)
  File "/home/synapse/bridges/mautrix-telegram/env/lib/python3.8/site-packages/telethon/client/users.py", line 328, in get_entity
    result.append(await self._get_entity_from_string(x))
  File "/home/synapse/bridges/mautrix-telegram/env/lib/python3.8/site-packages/telethon/client/users.py", line 567, in _get_entity_from_string
    raise ValueError(
ValueError: Cannot find any entity corresponding to "someroom/"

Removing the slash (join https://t.me/someroom) worked correctly :)

@tulir tulir added this to the 0.10.0 milestone Dec 19, 2020
@tulir tulir added the enhancement New feature or improvement label Dec 19, 2020
@tulir tulir closed this as completed in b22e3d2 Dec 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement
Development

No branches or pull requests

2 participants