BugFix
: Allow users to mention other users in Group Channels again
#724
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
I currently can't send messages in group channels when I mention members of the group with '@name'.
Matrix shows the message but nothing can be seen in Telegram.
After checking the logs, I've seen the following error:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/mautrix_telegram/portal.py", line 1690, in handle_matrix_message
await self._handle_matrix_message(sender, content, event_id)
File "/usr/lib/python3.9/site-packages/mautrix_telegram/portal.py", line 1744, in _handle_matrix_message
await self._handle_matrix_text(
File "/usr/lib/python3.9/site-packages/mautrix_telegram/portal.py", line 1464, in _handle_matrix_text
response = await client.send_message(
File "/usr/lib/python3.9/site-packages/telethon/client/messages.py", line 872, in send_message
result = await self(request)
File "/usr/lib/python3.9/site-packages/telethon/client/users.py", line 30, in call
return await self._call(self._sender, request, ordered=ordered)
File "/usr/lib/python3.9/site-packages/telethon/client/users.py", line 63, in _call
future = sender.send(request, ordered=ordered)
File "/usr/lib/python3.9/site-packages/telethon/network/mtprotosender.py", line 176, in send
state = RequestState(request)
File "/usr/lib/python3.9/site-packages/telethon/network/requeststate.py", line 17, in init
self.data = bytes(request)
File "/usr/lib/python3.9/site-packages/telethon/tl/tlobject.py", line 200, in bytes
raise TypeError('a TLObject was expected but found something else')
TypeError: a TLObject was expected but found something else
[2021-12-31 02:08:35,024] [[email protected]] /usr/lib/python3.9/site-packages/mautrix_telegram/portal.py:1704: RuntimeWarning: coroutine 'UserMethods.get_input_entity' was never awaited
await self._send_bridge_error(
I've tested the behavior on version
v0.11.0
andlatest
.I think I've found the missing await, therefore I've created this PR (For me the proposed change resolves the issue).
Nevertheless, someone else should also test the change :)