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

Commit

Permalink
Attempt to clarify docstring for get_receipts_for_user.
Browse files Browse the repository at this point in the history
  • Loading branch information
clokep committed Apr 28, 2022
1 parent 6d1d865 commit 0501bbc
Showing 1 changed file with 4 additions and 1 deletion.
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.
Args:
user_id: The user to fetch receipts for.
receipt_type: The receipt types to fetch.

This comment has been minimized.

Copy link
@DMRobertson

DMRobertson Apr 28, 2022

Contributor

Should this be receipt type singular?

Returns:
A map of room ID to the event ID of the latest receipt for that room.
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

0 comments on commit 0501bbc

Please sign in to comment.