Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

refactor: Make acting_user a mandatory kwarg for do_set_realm_message_editing.

shanukunf8ef7d56b9c3
diff --git a/zerver/lib/actions.py b/zerver/lib/actions.py
index 0e8b6b0cc11..c1803905cea 100644
--- a/zerver/lib/actions.py
+++ b/zerver/lib/actions.py
@@ -859,7 +859,8 @@ def do_set_realm_message_editing(
allow_message_editing: bool,
message_content_edit_limit_seconds: int,
allow_community_topic_editing: bool,
- acting_user: Optional[UserProfile] = None,
+ *,
+ acting_user: Optional[UserProfile],
) -> None:
old_values = dict(
allow_message_editing=realm.allow_message_editing,
diff --git a/zerver/tests/test_events.py b/zerver/tests/test_events.py
index a47b1b07e6c..d0bad290541 100644
--- a/zerver/tests/test_events.py
+++ b/zerver/tests/test_events.py
@@ -1140,6 +1140,7 @@ class NormalActionsTest(BaseAction):
allow_message_editing,
message_content_edit_limit_seconds,
False,
+ acting_user=None,
)
)
check_realm_update_dict("events[0]", events[0])