mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-07-23 20:10:37 -04:00
Include whether the requesting user has participated in a thread. (#11577)
Per updates to MSC3440. This is implement as a separate method since it needs to be cached on a per-user basis, instead of a per-thread basis.
This commit is contained in:
parent
251b5567ec
commit
68acb0a29d
9 changed files with 86 additions and 19 deletions
|
@ -1793,6 +1793,13 @@ class PersistEventsStore:
|
|||
txn.call_after(
|
||||
self.store.get_thread_summary.invalidate, (parent_id, event.room_id)
|
||||
)
|
||||
# It should be safe to only invalidate the cache if the user has not
|
||||
# previously participated in the thread, but that's difficult (and
|
||||
# potentially error-prone) so it is always invalidated.
|
||||
txn.call_after(
|
||||
self.store.get_thread_participated.invalidate,
|
||||
(parent_id, event.room_id, event.sender),
|
||||
)
|
||||
|
||||
def _handle_insertion_event(self, txn: LoggingTransaction, event: EventBase):
|
||||
"""Handles keeping track of insertion events and edges/connections.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue