Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
narrow: Rename function to check_narrow_for_events.
Steve Howell7cb4c0bdfef6
diff --git a/zerver/lib/events.py b/zerver/lib/events.pyindex 59c567b613d..b937e338a5b 100644--- a/zerver/lib/events.py+++ b/zerver/lib/events.py@@ -36,7 +36,7 @@ from zerver.lib.message import ()from zerver.lib.muted_users import get_user_mutesfrom zerver.lib.narrow import (- check_supported_events_narrow_filter,+ check_narrow_for_events,narrow_dataclasses_from_tuples,read_stop_words,)@@ -1477,7 +1477,7 @@ def do_events_register(# Technically we don't need to check this here because# build_narrow_filter will check it, but it's nicer from an error# handling perspective to do it before contacting Tornado- check_supported_events_narrow_filter(modern_narrow)+ check_narrow_for_events(modern_narrow)notification_settings_null = client_capabilities.get("notification_settings_null", False)bulk_message_deletion = client_capabilities.get("bulk_message_deletion", False)diff --git a/zerver/lib/narrow.py b/zerver/lib/narrow.pyindex cd855c201b4..af401aff4e8 100644--- a/zerver/lib/narrow.py+++ b/zerver/lib/narrow.py@@ -116,7 +116,7 @@ def read_stop_words() -> List[str]:return stop_words_list-def check_supported_events_narrow_filter(narrow: Collection[NarrowTerm]) -> None:+def check_narrow_for_events(narrow: Collection[NarrowTerm]) -> None:for narrow_term in narrow:operator = narrow_term.operatorif operator not in ["stream", "topic", "sender", "is"]:@@ -158,7 +158,7 @@ def build_narrow_filter() -> NarrowPredicate:"""Changes to this function should come with corresponding changes toNarrowLibraryTest."""- check_supported_events_narrow_filter(narrow)+ check_narrow_for_events(narrow)def narrow_filter(*, message: Dict[str, Any], flags: List[str]) -> bool:def satisfies_operator(*, operator: str, operand: str) -> bool: