|
@@ -183,19 +183,31 @@ function _conferenceJoined(state, { conference }) {
|
183
|
183
|
* reduction of the specified action.
|
184
|
184
|
*/
|
185
|
185
|
function _conferenceLeft(state, { conference }) {
|
186
|
|
- if (state.conference !== conference) {
|
187
|
|
- return state;
|
|
186
|
+ let output = state;
|
|
187
|
+
|
|
188
|
+ if (state.authRequired === conference) {
|
|
189
|
+ output = set(output, 'authRequired', undefined);
|
|
190
|
+ }
|
|
191
|
+ if (state.conference === conference) {
|
|
192
|
+ output = assign(output, {
|
|
193
|
+ conference: undefined,
|
|
194
|
+ joining: undefined,
|
|
195
|
+ leaving: undefined
|
|
196
|
+ });
|
|
197
|
+ }
|
|
198
|
+ if (state.passwordRequired === conference) {
|
|
199
|
+ // Note that in case the conference was joined those fields have been
|
|
200
|
+ // cleared already, so this step needs to be done only if the room
|
|
201
|
+ // unlock operation has been canceled and that's why it's not done in
|
|
202
|
+ // the 'state.conference' condition above.
|
|
203
|
+ output = assign(output, {
|
|
204
|
+ locked: undefined,
|
|
205
|
+ password: undefined,
|
|
206
|
+ passwordRequired: undefined
|
|
207
|
+ });
|
188
|
208
|
}
|
189
|
209
|
|
190
|
|
- return assign(state, {
|
191
|
|
- authRequired: undefined,
|
192
|
|
- conference: undefined,
|
193
|
|
- joining: undefined,
|
194
|
|
- leaving: undefined,
|
195
|
|
- locked: undefined,
|
196
|
|
- password: undefined,
|
197
|
|
- passwordRequired: undefined
|
198
|
|
- });
|
|
210
|
+ return output;
|
199
|
211
|
}
|
200
|
212
|
|
201
|
213
|
/**
|