diff options
author | Travis Ralston <travpc@gmail.com> | 2019-09-05 20:46:05 -0600 |
---|---|---|
committer | Travis Ralston <travpc@gmail.com> | 2019-09-05 20:56:01 -0600 |
commit | 30f0824079e5a65ed797443d8709a66518df2152 (patch) | |
tree | caa2b94e67733693ba6a56f02d685939648f2d53 /synapse | |
parent | import the important things in life (diff) | |
download | synapse-30f0824079e5a65ed797443d8709a66518df2152.tar.xz |
Filter out hidden read receipts for federation workers
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/app/federation_sender.py | 2 | ||||
-rw-r--r-- | synapse/handlers/receipts.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/synapse/app/federation_sender.py b/synapse/app/federation_sender.py index 04fbb407af..802788b7fa 100644 --- a/synapse/app/federation_sender.py +++ b/synapse/app/federation_sender.py @@ -262,6 +262,8 @@ class FederationSenderHandler(object): # we only want to send on receipts for our own users if not self._is_mine_id(receipt.user_id): continue + if receipt.data.get("hidden", False): + return # do not send over federation receipt_info = ReadReceipt( receipt.room_id, receipt.receipt_type, diff --git a/synapse/handlers/receipts.py b/synapse/handlers/receipts.py index e3f20622fb..73bf7ef144 100644 --- a/synapse/handlers/receipts.py +++ b/synapse/handlers/receipts.py @@ -115,7 +115,7 @@ class ReceiptsHandler(BaseHandler): receipt_type=receipt_type, user_id=user_id, event_ids=[event_id], - data={"ts": int(self.clock.time_msec())}, + data={"ts": int(self.clock.time_msec()), "hidden": hidden}, ) is_new = yield self._handle_new_receipts([receipt]) |