summary refs log tree commit diff
path: root/synapse/notifier.py
diff options
context:
space:
mode:
authorAndrew Morgan <1342360+anoadragon453@users.noreply.github.com>2021-10-21 17:42:25 +0100
committerGitHub <noreply@github.com>2021-10-21 17:42:25 +0100
commit6408372234eef2d72a13ee838c07199751c56378 (patch)
tree494d4e8582c1c4b3d532f2d7e76ce0ab96780d12 /synapse/notifier.py
parentAdd missing type hints to synapse.crypto. (#11146) (diff)
downloadsynapse-6408372234eef2d72a13ee838c07199751c56378.tar.xz
Improve docstrings for methods related to sending EDUs to application services (#11138)
Diffstat (limited to '')
-rw-r--r--synapse/notifier.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/synapse/notifier.py b/synapse/notifier.py
index 1a9f84ba45..1acd899fab 100644
--- a/synapse/notifier.py
+++ b/synapse/notifier.py
@@ -379,7 +379,14 @@ class Notifier:
         stream_key: str,
         new_token: Union[int, RoomStreamToken],
         users: Optional[Collection[Union[str, UserID]]] = None,
-    ):
+    ) -> None:
+        """Notify application services of ephemeral event activity.
+
+        Args:
+            stream_key: The stream the event came from.
+            new_token: The value of the new stream token.
+            users: The users that should be informed of the new event, if any.
+        """
         try:
             stream_token = None
             if isinstance(new_token, int):
@@ -402,10 +409,17 @@ class Notifier:
         new_token: Union[int, RoomStreamToken],
         users: Optional[Collection[Union[str, UserID]]] = None,
         rooms: Optional[Collection[str]] = None,
-    ):
+    ) -> None:
         """Used to inform listeners that something has happened event wise.
 
         Will wake up all listeners for the given users and rooms.
+
+        Args:
+            stream_key: The stream the event came from.
+            new_token: The value of the new stream token.
+            users: The users that should be informed of the new event.
+            rooms: A collection of room IDs for which each joined member will be
+                informed of the new event.
         """
         users = users or []
         rooms = rooms or []