Skip to content

Commit b8b74e6

Browse files
committed
realm state: Fill in some live-updating gaps; mark another with a TODO
1 parent 63861dc commit b8b74e6

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/realm/realmReducer.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,15 @@ export default (
138138
([name, { url_pattern }]) => [name, { url_pattern }],
139139
),
140140
),
141+
142+
// TODO: On EventTypes.realm events with video_chat_provider, update
143+
// the state or cause a re-register.
141144
videoChatProvider: getVideoChatProvider({
142145
availableProviders: action.data.realm_available_video_chat_providers,
143146
jitsiServerUrl: action.data.jitsi_server_url,
144147
providerId: action.data.realm_video_chat_provider,
145148
}),
149+
146150
mandatoryTopics: action.data.realm_mandatory_topics,
147151
messageContentDeleteLimitSeconds: action.data.realm_message_content_delete_limit_seconds,
148152
messageContentEditLimitSeconds: action.data.realm_message_content_edit_limit_seconds,
@@ -242,6 +246,15 @@ export default (
242246
if (data.description !== undefined) {
243247
result.description = data.description;
244248
}
249+
if (data.mandatory_topics !== undefined) {
250+
result.mandatoryTopics = data.mandatory_topics;
251+
}
252+
if (data.message_content_delete_limit_seconds !== undefined) {
253+
result.messageContentDeleteLimitSeconds = data.message_content_delete_limit_seconds;
254+
}
255+
if (data.message_content_edit_limit_seconds !== undefined) {
256+
result.messageContentEditLimitSeconds = data.message_content_edit_limit_seconds;
257+
}
245258
if (data.create_stream_policy !== undefined) {
246259
// TODO(server-5.0): Stop expecting create_stream_policy; simplify.
247260
result.createPublicStreamPolicy = data.create_stream_policy;

0 commit comments

Comments
 (0)