mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-08 02:32:41 -04:00
Clarify that a method returns only unthreaded receipts. (#13937)
By renaming it and updating the docstring. Additionally, refactors a method which is used only by tests.
This commit is contained in:
parent
99a7e7e023
commit
568016929f
4 changed files with 47 additions and 76 deletions
|
@ -366,14 +366,11 @@ class EventPushActionsWorkerStore(ReceiptsWorkerStore, StreamWorkerStore, SQLBas
|
|||
user_id: str,
|
||||
) -> NotifCounts:
|
||||
# Get the stream ordering of the user's latest receipt in the room.
|
||||
result = self.get_last_receipt_for_user_txn(
|
||||
result = self.get_last_unthreaded_receipt_for_user_txn(
|
||||
txn,
|
||||
user_id,
|
||||
room_id,
|
||||
receipt_types=(
|
||||
ReceiptTypes.READ,
|
||||
ReceiptTypes.READ_PRIVATE,
|
||||
),
|
||||
receipt_types=(ReceiptTypes.READ, ReceiptTypes.READ_PRIVATE),
|
||||
)
|
||||
|
||||
if result:
|
||||
|
@ -574,10 +571,7 @@ class EventPushActionsWorkerStore(ReceiptsWorkerStore, StreamWorkerStore, SQLBas
|
|||
receipt_types_clause, args = make_in_list_sql_clause(
|
||||
self.database_engine,
|
||||
"receipt_type",
|
||||
(
|
||||
ReceiptTypes.READ,
|
||||
ReceiptTypes.READ_PRIVATE,
|
||||
),
|
||||
(ReceiptTypes.READ, ReceiptTypes.READ_PRIVATE),
|
||||
)
|
||||
|
||||
sql = f"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue