|
@@ -14,7 +14,8 @@ import {
|
14
|
14
|
} from '../../react/features/base/conference';
|
15
|
15
|
import { parseJWTFromURLParams } from '../../react/features/base/jwt';
|
16
|
16
|
import JitsiMeetJS, { JitsiRecordingConstants } from '../../react/features/base/lib-jitsi-meet';
|
17
|
|
-import { pinParticipant } from '../../react/features/base/participants';
|
|
17
|
+import { pinParticipant, getParticipantById } from '../../react/features/base/participants';
|
|
18
|
+import { setPrivateMessageRecipient } from '../../react/features/chat/actions';
|
18
|
19
|
import {
|
19
|
20
|
processExternalDeviceRequest
|
20
|
21
|
} from '../../react/features/device-selection/functions';
|
|
@@ -330,6 +331,24 @@ function initCommands() {
|
330
|
331
|
} else {
|
331
|
332
|
logger.error('No recording or streaming session found');
|
332
|
333
|
}
|
|
334
|
+ },
|
|
335
|
+ 'initiate-private-chat': participantId => {
|
|
336
|
+ const state = APP.store.getState();
|
|
337
|
+ const participant = getParticipantById(state, participantId);
|
|
338
|
+
|
|
339
|
+ if (participant) {
|
|
340
|
+ const { isOpen: isChatOpen } = state['features/chat'];
|
|
341
|
+
|
|
342
|
+ if (!isChatOpen) {
|
|
343
|
+ APP.UI.toggleChat();
|
|
344
|
+ }
|
|
345
|
+ APP.store.dispatch(setPrivateMessageRecipient(participant));
|
|
346
|
+ } else {
|
|
347
|
+ logger.error('No participant found for the given participantId');
|
|
348
|
+ }
|
|
349
|
+ },
|
|
350
|
+ 'cancel-private-chat': () => {
|
|
351
|
+ APP.store.dispatch(setPrivateMessageRecipient());
|
333
|
352
|
}
|
334
|
353
|
};
|
335
|
354
|
transport.on('event', ({ data, name }) => {
|