mirror of https://github.com/zulip/zulip.git
events: Use 'get_notifications_stream' realm method.
This commit updates the code in 'fetch_initial_state_data' function to use the 'get_notifications_stream' method instead of re-writing the logic.
This commit is contained in:
parent
77ab7d810e
commit
0c83bca81e
|
@ -362,8 +362,8 @@ def fetch_initial_state_data(
|
|||
else server_default_jitsi_server_url
|
||||
)
|
||||
|
||||
if realm.notifications_stream and not realm.notifications_stream.deactivated:
|
||||
notifications_stream = realm.notifications_stream
|
||||
notifications_stream = realm.get_notifications_stream()
|
||||
if notifications_stream:
|
||||
state["realm_notifications_stream_id"] = notifications_stream.id
|
||||
else:
|
||||
state["realm_notifications_stream_id"] = -1
|
||||
|
|
Loading…
Reference in New Issue