mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 12:16:09 -04:00
Don't load all ephemeral state for a room on every sync
This commit is contained in:
parent
82631c5f94
commit
eff12e838c
2 changed files with 20 additions and 14 deletions
|
@ -46,6 +46,20 @@ class ReceiptsStore(SQLBaseStore):
|
|||
desc="get_receipts_for_room",
|
||||
)
|
||||
|
||||
@cached(num_args=3)
|
||||
def get_last_receipt_event_id_for_user(self, user_id, room_id, receipt_type):
|
||||
return self._simple_select_one_onecol(
|
||||
table="receipts_linearized",
|
||||
keyvalues={
|
||||
"room_id": room_id,
|
||||
"receipt_type": receipt_type,
|
||||
"user_id": user_id
|
||||
},
|
||||
retcol="event_id",
|
||||
desc="get_own_receipt_for_user",
|
||||
allow_none=True,
|
||||
)
|
||||
|
||||
@cachedInlineCallbacks(num_args=2)
|
||||
def get_receipts_for_user(self, user_id, receipt_type):
|
||||
def f(txn):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue