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:
Prakhar Pratyush 2024-01-29 19:12:09 +05:30 committed by Tim Abbott
parent 77ab7d810e
commit 0c83bca81e
1 changed files with 2 additions and 2 deletions

View File

@ -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