mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
settings: Add realm-level setting moderation_request_channel.
This commit introduces a new non-operational `moderation_request_channel` field to the server/API. This setting will support a feature allowing users to flag or report abusive content (harassment, spam, etc.). Fixes part of #20047.
This commit is contained in:
@@ -420,6 +420,12 @@ def fetch_initial_state_data(
|
||||
else server_default_jitsi_server_url
|
||||
)
|
||||
|
||||
moderation_request_channel = realm.get_moderation_request_channel()
|
||||
if moderation_request_channel:
|
||||
state["realm_moderation_request_channel_id"] = moderation_request_channel.id
|
||||
else:
|
||||
state["realm_moderation_request_channel_id"] = -1
|
||||
|
||||
new_stream_announcements_stream = realm.get_new_stream_announcements_stream()
|
||||
if new_stream_announcements_stream:
|
||||
state["realm_new_stream_announcements_stream_id"] = new_stream_announcements_stream.id
|
||||
|
||||
Reference in New Issue
Block a user