Skip to content

Commit

Permalink
Don't send delivery receipts to unencrypted private chat portals. Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Oct 9, 2020
1 parent 522e33b commit a4595b4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mautrix_telegram/portal/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,9 @@ async def _get_users(self, user: 'AbstractUser',

async def _send_delivery_receipt(self, event_id: EventID, room_id: Optional[RoomID] = None
) -> None:
if event_id and config["bridge.delivery_receipts"]:
# TODO maybe check if the bot is in the room rather than assuming based on self.encrypted
if event_id and config["bridge.delivery_receipts"] and (self.encrypted
or self.peer_type != "user"):
try:
await self.az.intent.mark_read(room_id or self.mxid, event_id)
except Exception:
Expand Down

0 comments on commit a4595b4

Please sign in to comment.