Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Improve the docstrings for the receipts store. #12581

Merged
merged 8 commits into from
Apr 28, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion synapse/storage/databases/main/receipts.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,17 @@ async def get_receipts_for_user(
self, user_id: str, receipt_type: str
) -> Dict[str, str]:
"""
Fetch the event IDs for the latest receipt in all rooms with the given receipt type.
Fetch the event IDs for the latest receipt sent by the given user.
clokep marked this conversation as resolved.
Show resolved Hide resolved

Args:
user_id: The user to fetch receipts for.
receipt_type: The receipt types to fetch.

Returns:
A map of room ID to the event ID of the latest receipt for that room.
DMRobertson marked this conversation as resolved.
Show resolved Hide resolved

If the user has not sent a receipt to a room then it will not appear
in the returned dictionary.
"""
rows = await self.db_pool.simple_select_list(
table="receipts_linearized",
Expand Down