mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 06:14:57 -04:00
Add remaining type hints to synapse.events
. (#11098)
This commit is contained in:
parent
4535532526
commit
c01bc5f43d
15 changed files with 184 additions and 109 deletions
|
@ -232,6 +232,8 @@ class BulkPushRuleEvaluator:
|
|||
# that user, as they might not be already joined.
|
||||
if event.type == EventTypes.Member and event.state_key == uid:
|
||||
display_name = event.content.get("displayname", None)
|
||||
if not isinstance(display_name, str):
|
||||
display_name = None
|
||||
|
||||
if count_as_unread:
|
||||
# Add an element for the current user if the event needs to be marked as
|
||||
|
@ -268,7 +270,7 @@ def _condition_checker(
|
|||
evaluator: PushRuleEvaluatorForEvent,
|
||||
conditions: List[dict],
|
||||
uid: str,
|
||||
display_name: str,
|
||||
display_name: Optional[str],
|
||||
cache: Dict[str, bool],
|
||||
) -> bool:
|
||||
for cond in conditions:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue