Sfoglia il codice sorgente

feat(api) expose follow me method (#9486)

j8
Avram Tudor 4 anni fa
parent
commit
0507f8c2f9
Nessun account collegato all'indirizzo email del committer
2 ha cambiato i file con 13 aggiunte e 0 eliminazioni
  1. 12
    0
      modules/API/API.js
  2. 1
    0
      modules/API/external/external_api.js

+ 12
- 0
modules/API/API.js Vedi File

@@ -9,6 +9,7 @@ import {
9 9
 import {
10 10
     getCurrentConference,
11 11
     sendTones,
12
+    setFollowMe,
12 13
     setPassword,
13 14
     setSubject
14 15
 } from '../../react/features/base/conference';
@@ -153,6 +154,17 @@ function initCommands() {
153 154
 
154 155
             APP.store.dispatch(sendTones(tones, duration, pause));
155 156
         },
157
+        'set-follow-me': value => {
158
+            logger.debug('Set follow me command received');
159
+
160
+            if (value) {
161
+                sendAnalytics(createApiEvent('follow.me.set'));
162
+            } else {
163
+                sendAnalytics(createApiEvent('follow.me.unset'));
164
+            }
165
+
166
+            APP.store.dispatch(setFollowMe(value));
167
+        },
156 168
         'set-large-video-participant': participantId => {
157 169
             logger.debug('Set large video participant command received');
158 170
             sendAnalytics(createApiEvent('largevideo.participant.set'));

+ 1
- 0
modules/API/external/external_api.js Vedi File

@@ -44,6 +44,7 @@ const commands = {
44 44
     sendChatMessage: 'send-chat-message',
45 45
     sendEndpointTextMessage: 'send-endpoint-text-message',
46 46
     sendTones: 'send-tones',
47
+    setFollowMe: 'set-follow-me',
47 48
     setLargeVideoParticipant: 'set-large-video-participant',
48 49
     setTileView: 'set-tile-view',
49 50
     setVideoQuality: 'set-video-quality',

Loading…
Annulla
Salva