mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-24 15:50:25 -04:00
Avoid attempting to delete push actions for remote users. (#12879)
Remote users will never have push actions, so we can avoid a database round-trip/transaction completely.
This commit is contained in:
parent
b83bc5fab5
commit
b5707ceaba
5 changed files with 8 additions and 4 deletions
|
@ -673,8 +673,11 @@ class ReceiptsWorkerStore(SQLBaseStore):
|
|||
lock=False,
|
||||
)
|
||||
|
||||
# When updating a local users read receipt, remove any push actions
|
||||
# which resulted from the receipt's event and all earlier events.
|
||||
if (
|
||||
receipt_type in (ReceiptTypes.READ, ReceiptTypes.READ_PRIVATE)
|
||||
self.hs.is_mine_id(user_id)
|
||||
and receipt_type in (ReceiptTypes.READ, ReceiptTypes.READ_PRIVATE)
|
||||
and stream_ordering is not None
|
||||
):
|
||||
self._remove_old_push_actions_before_txn( # type: ignore[attr-defined]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue