|
@@ -1,6 +1,11 @@
|
1
|
1
|
// @flow
|
2
|
2
|
|
3
|
|
-import { setPassword } from '../base/conference';
|
|
3
|
+import { appNavigate } from '../app';
|
|
4
|
+import {
|
|
5
|
+ conferenceLeft,
|
|
6
|
+ JITSI_CONFERENCE_URL_KEY,
|
|
7
|
+ setPassword
|
|
8
|
+} from '../base/conference';
|
4
|
9
|
import { hideDialog, openDialog } from '../base/dialog';
|
5
|
10
|
import { PasswordRequiredPrompt, RoomLockPrompt } from './components';
|
6
|
11
|
|
|
@@ -23,6 +28,38 @@ export function beginRoomLockRequest(conference: ?Object) {
|
23
|
28
|
};
|
24
|
29
|
}
|
25
|
30
|
|
|
31
|
+/**
|
|
32
|
+ * Cancels a prompt for a password to join a specific conference/room.
|
|
33
|
+ *
|
|
34
|
+ * @param {JitsiConference} conference - The {@code JitsiConference} requesting
|
|
35
|
+ * the password to join.
|
|
36
|
+ * @protected
|
|
37
|
+ * @returns {Function}
|
|
38
|
+ */
|
|
39
|
+export function _cancelPasswordRequiredPrompt(conference: Object) {
|
|
40
|
+ return (dispatch: Dispatch<*>, getState: Function) => {
|
|
41
|
+ // Canceling PasswordRequiredPrompt is to navigate the app/user to
|
|
42
|
+ // WelcomePage. In other words, the canceling invalidates the
|
|
43
|
+ // locationURL. Make sure that the canceling indeed has the intent to
|
|
44
|
+ // invalidate the locationURL.
|
|
45
|
+ const state = getState();
|
|
46
|
+
|
|
47
|
+ if (conference === state['features/base/conference'].passwordRequired
|
|
48
|
+ && conference[JITSI_CONFERENCE_URL_KEY]
|
|
49
|
+ === state['features/base/connection'].locationURL) {
|
|
50
|
+ // XXX The error associated with CONFERENCE_FAILED was marked as
|
|
51
|
+ // recoverable by the feature room-lock and, consequently,
|
|
52
|
+ // recoverable-aware features such as mobile's external-api did not
|
|
53
|
+ // deliver the CONFERENCE_FAILED to the SDK clients/consumers. Since
|
|
54
|
+ // the app/user is going to nativate to WelcomePage, the SDK
|
|
55
|
+ // clients/consumers need an event.
|
|
56
|
+ dispatch(conferenceLeft(conference));
|
|
57
|
+
|
|
58
|
+ dispatch(appNavigate(undefined));
|
|
59
|
+ }
|
|
60
|
+ };
|
|
61
|
+}
|
|
62
|
+
|
26
|
63
|
/**
|
27
|
64
|
* Ends a (user) request to lock a specific conference/room.
|
28
|
65
|
*
|
|
@@ -47,10 +84,10 @@ export function endRoomLockRequest(
|
47
|
84
|
}
|
48
|
85
|
|
49
|
86
|
/**
|
50
|
|
- * Begins a request to enter password for a specific conference/room.
|
|
87
|
+ * Begins a prompt for a password to join a specific conference/room.
|
51
|
88
|
*
|
52
|
|
- * @param {JitsiConference} conference - The JitsiConference
|
53
|
|
- * requesting password.
|
|
89
|
+ * @param {JitsiConference} conference - The {@code JitsiConference}
|
|
90
|
+ * requesting the password to join.
|
54
|
91
|
* @protected
|
55
|
92
|
* @returns {{
|
56
|
93
|
* type: OPEN_DIALOG,
|