From 0501bbc002d8d3391c3f335aa15286f4d59a6d5a Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Thu, 28 Apr 2022 13:13:00 -0400 Subject: [PATCH] Attempt to clarify docstring for get_receipts_for_user. --- synapse/storage/databases/main/receipts.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/synapse/storage/databases/main/receipts.py b/synapse/storage/databases/main/receipts.py index a649bd8e6fdb..322d99b921f7 100644 --- a/synapse/storage/databases/main/receipts.py +++ b/synapse/storage/databases/main/receipts.py @@ -176,7 +176,7 @@ 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. @@ -184,6 +184,9 @@ async def get_receipts_for_user( 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",