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

Support joining via https://t.me/s/roomname links #555

Closed
anoadragon453 opened this issue Dec 10, 2020 · 0 comments
Closed

Support joining via https://t.me/s/roomname links #555

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

Comments

@anoadragon453
Copy link
Contributor

I'm a bit of a noob with Telegram, and as such am not entirely sure what an extra /s/ in a Telegram invite link means. But somehow I ended up with this URL on my clipboard from visiting a https://t.me site in my webbrowser.

I tried to hand it to the bridge via join https://t.me/s/roomname, and got the following back as a response:

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 "s/someroom"

However, doing join https://t.me/someroom instead worked fine.

If this is some sort of standard Telegram thing, then it might be nice to handle and strip the /s bit from them :)

@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