summary refs log tree commit diff
path: root/synapse/storage/databases/main/events.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2021-12-30 13:47:12 -0500
committerGitHub <noreply@github.com>2021-12-30 18:47:12 +0000
commitcbd82d0b2db069400b5d43373838817d8a0209e7 (patch)
tree5380e1b2c6ad6e112754f45d0d85274f7a8641e8 /synapse/storage/databases/main/events.py
parentAdd type hints to `synapse/storage/databases/main/events_bg_updates.py` (#11654) (diff)
downloadsynapse-cbd82d0b2db069400b5d43373838817d8a0209e7.tar.xz
Convert all namedtuples to attrs. (#11665)
To improve type hints throughout the code.
Diffstat (limited to 'synapse/storage/databases/main/events.py')
-rw-r--r--synapse/storage/databases/main/events.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/synapse/storage/databases/main/events.py b/synapse/storage/databases/main/events.py
index 81e67ece55..dd255aefb9 100644
--- a/synapse/storage/databases/main/events.py
+++ b/synapse/storage/databases/main/events.py
@@ -1976,14 +1976,17 @@ class PersistEventsStore:
                 txn, self.store.get_retention_policy_for_room, (event.room_id,)
             )
 
-    def store_event_search_txn(self, txn, event, key, value):
+    def store_event_search_txn(
+        self, txn: LoggingTransaction, event: EventBase, key: str, value: str
+    ) -> None:
         """Add event to the search table
 
         Args:
-            txn (cursor):
-            event (EventBase):
-            key (str):
-            value (str):
+            txn: The database transaction.
+            event: The event being added to the search table.
+            key: A key describing the search value (one of "content.name",
+                "content.topic", or "content.body")
+            value: The value from the event's content.
         """
         self.store.store_search_entries_txn(
             txn,