Skip to content

Commit

Permalink
Revert "Don't send delivery receipts to unencrypted private chat port…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
zsinskri committed Jul 17, 2022
1 parent a9b6539 commit ef57f10
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions mautrix_telegram/portal.py
Original file line number Diff line number Diff line change
Expand Up @@ -1262,12 +1262,7 @@ async def _update_avatar(
async def _send_delivery_receipt(
self, event_id: EventID, room_id: RoomID | None = None
) -> None:
# TODO maybe check if the bot is in the room rather than assuming based on self.encrypted
if (
event_id
and self.config["bridge.delivery_receipts"]
and (self.encrypted or self.peer_type != "user")
):
if event_id and self.config["bridge.delivery_receipts"]:
try:
await self.az.intent.mark_read(room_id or self.mxid, event_id)
except Exception:
Expand Down

0 comments on commit ef57f10

Please sign in to comment.