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

Error when trying to join telegram protocol link #966

Open
girlpunk opened this issue Jul 5, 2024 · 0 comments
Open

Error when trying to join telegram protocol link #966

girlpunk opened this issue Jul 5, 2024 · 0 comments

Comments

@girlpunk
Copy link

girlpunk commented Jul 5, 2024

Some telegram rooms are linked with the tg protocol handler, intended to be handled by the browser and open the Telegram app. For example: tg://resolve?domain=ABC.

When trying to join such a link using !tg join tg://resolve?domain=ABC, the following error occurs

Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/mautrix/bridge/commands/handler.py", line 491, in handle
    await self._run_handler(handler, evt)
  File "/usr/lib/python3.11/site-packages/mautrix_telegram/commands/handler.py", line 194, in _run_handler
    return await handler(evt)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/mautrix/bridge/commands/handler.py", line 340, in __call__
    return await self._handler(evt)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/mautrix_telegram/commands/telegram/misc.py", line 271, in join
    async with ClientSession() as sess, sess.get(url) as resp:
  File "/usr/lib/python3.11/site-packages/aiohttp/client.py", line 1167, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/aiohttp/client.py", line 562, in _request
    conn = await self._connector.connect(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/aiohttp/connector.py", line 540, in connect
    proto = await self._create_connection(req, traces, timeout)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/aiohttp/connector.py", line 901, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/aiohttp/connector.py", line 1147, in _create_direct_connection
    assert port is not None
           ^^^^^^^^^^^^^^^^
AssertionError

I believe these links are functionally identical, albeit in a different format. As such, the above example should be equivalent to https://t.me/ABC

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

No branches or pull requests

1 participant