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

Delivery receipts in DM chats are not working and causing errors #483

Closed
JuniorJPDJ opened this issue Jun 11, 2020 · 0 comments
Closed

Delivery receipts in DM chats are not working and causing errors #483

JuniorJPDJ opened this issue Jun 11, 2020 · 0 comments
Labels
bug: defect Something isn't working and it never has worked
Milestone

Comments

@JuniorJPDJ
Copy link

JuniorJPDJ commented Jun 11, 2020

mautrix-telegram_1  | 2020-06-11T19:17:04.981945290Z [2020-06-11 19:17:04,981] [[email protected].[ID]<->[ID]] Sending Zjadłabym kawałek pizzy na pocieszenie to !vGDXlUffWEBaAnOhUB:juniorjpdj.pl by @telegram_[ID]:juniorjpdj
.pl
mautrix-telegram_1  | 2020-06-11T19:17:05.044024056Z [2020-06-11 19:17:05,043] [[email protected].[ID]<->[ID]] Handled telegram message [ID] -> $zloOrs4UZ1mlXWD2xzS4sWTpORKmAgX0dpEBdL0OOGI
mautrix-telegram_1  | 2020-06-11T19:17:05.071908295Z [2020-06-11 19:17:05,071] [[email protected]] 10.201.8.130 [11/Jun/2020:19:17:05 +0000] "PUT /transactions/97769?access_token=<CENSORED>
k13o66wa HTTP/1.1" 200 158 "-" "Synapse/1.14.0"
mautrix-telegram_1  | 2020-06-11T19:17:05.120489461Z [2020-06-11 19:17:05,119] [[email protected].[ID]<->[ID]] Failed to send delivery receipt for $zloOrs4UZ1mlXWD2xzS4sWTpORKmAgX0dpEBdL0OOGI
mautrix-telegram_1  | 2020-06-11T19:17:05.120534897Z Traceback (most recent call last):
mautrix-telegram_1  | 2020-06-11T19:17:05.120548396Z   File "/usr/lib/python3.8/site-packages/mautrix/appservice/api/intent.py", line 357, in ensure_joined
mautrix-telegram_1  | 2020-06-11T19:17:05.120559843Z     await self.join_room(room_id, max_retries=0)
mautrix-telegram_1  | 2020-06-11T19:17:05.120570250Z   File "/usr/lib/python3.8/site-packages/mautrix/appservice/api/intent.py", line 75, in wrapper
mautrix-telegram_1  | 2020-06-11T19:17:05.120580906Z     return await __method(*args, **kwargs)
mautrix-telegram_1  | 2020-06-11T19:17:05.120591316Z   File "/usr/lib/python3.8/site-packages/mautrix/client/api/rooms.py", line 252, in join_room
mautrix-telegram_1  | 2020-06-11T19:17:05.120601870Z     content = await self.api.request(Method.POST, Path.join[room_id_or_alias],
mautrix-telegram_1  | 2020-06-11T19:17:05.120612373Z   File "/usr/lib/python3.8/site-packages/mautrix/api/http.py", line 203, in request
mautrix-telegram_1  | 2020-06-11T19:17:05.120622762Z     return await self._send(method, endpoint, content, query_params, headers or {})
mautrix-telegram_1  | 2020-06-11T19:17:05.120632669Z   File "/usr/lib/python3.8/site-packages/mautrix/api/http.py", line 143, in _send
mautrix-telegram_1  | 2020-06-11T19:17:05.120642869Z     raise make_request_error(http_status=response.status,
mautrix-telegram_1  | 2020-06-11T19:17:05.120652649Z mautrix.errors.request.MForbidden: You are not invited to this room.
mautrix-telegram_1  | 2020-06-11T19:17:05.120662539Z 
mautrix-telegram_1  | 2020-06-11T19:17:05.120672052Z The above exception was the direct cause of the following exception:
mautrix-telegram_1  | 2020-06-11T19:17:05.120681869Z 
mautrix-telegram_1  | 2020-06-11T19:17:05.120691415Z Traceback (most recent call last):
mautrix-telegram_1  | 2020-06-11T19:17:05.120701205Z   File "/usr/lib/python3.8/site-packages/mautrix_telegram/portal/metadata.py", line 768, in _send_delivery_receipt
mautrix-telegram_1  | 2020-06-11T19:17:05.120711708Z     await self.az.intent.mark_read(self.mxid, event_id)
mautrix-telegram_1  | 2020-06-11T19:17:05.120721484Z   File "/usr/lib/python3.8/site-packages/mautrix/appservice/api/intent.py", line 344, in mark_read
mautrix-telegram_1  | 2020-06-11T19:17:05.120757324Z     await self.set_fully_read_marker(room_id, fully_read=event_id, read_receipt=event_id)
mautrix-telegram_1  | 2020-06-11T19:17:05.120769931Z   File "/usr/lib/python3.8/site-packages/mautrix/appservice/api/intent.py", line 86, in wrapper
mautrix-telegram_1  | 2020-06-11T19:17:05.120780260Z     await __self.ensure_joined(room_id)
mautrix-telegram_1  | 2020-06-11T19:17:05.120790120Z   File "/usr/lib/python3.8/site-packages/mautrix/appservice/api/intent.py", line 361, in ensure_joined
mautrix-telegram_1  | 2020-06-11T19:17:05.120800483Z     raise IntentError(f"Failed to join room {room_id} as {self.mxid}") from e
mautrix-telegram_1  | 2020-06-11T19:17:05.120810980Z mautrix.errors.base.IntentError: Failed to join room !vGDXlUffWEBaAnOhUB:juniorjpdj.pl as @telegrambot:juniorjpdj.pl
@tulir tulir added the bug: defect Something isn't working and it never has worked label Jun 11, 2020
@tulir tulir added this to the 0.8.x milestone Jun 11, 2020
@tulir tulir modified the milestones: 0.8.x, 0.9.0 Jul 27, 2020
@tulir tulir closed this as completed in a4595b4 Oct 9, 2020
zsinskri added a commit to zsinskri/mautrix-telegram that referenced this issue Jul 17, 2022
…als. Fixes mautrix#483"

This reverts commit a4595b4.

Commit a4595b4 avoids sending delivery receipts to rooms that do not contain the
bridge bot.  That was necessary as trying to send a read marker would
automatically attempt to join the bridge bot to the room.
That join without invite would fail, hence mautrix#483.

But since
mautrix/python@f272f16
we no longer attempt to join the sender of read receipts, fixing mautrix#483 without
necessarily sacrificing the delivery receipt functionality.

Thus:
- a4595b4 is no longer necessary, its original purpose is fulfilled by f272f16.
- a4595b4 prevents delivery receipts from working in unencrypted rooms.
- This reverts a4595b4, thus enabling delivery receipts in unencrypted rooms.
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