mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 02:25:05 -04:00
Improve docstrings for methods related to sending EDUs to application services (#11138)
This commit is contained in:
parent
0f9adc99ad
commit
6408372234
7 changed files with 148 additions and 23 deletions
|
@ -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 []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue