Browse Source

[RN] Handle presence

Up until now, mobile was oblivious to participants' presence state. Presence
state handling is required (probably, amongst other things) for "call flows".
So, let's add it! This is done by gathering the presence state when a
participant first joins, and handling subsequent changes.
master
Saúl Ibarra Corretgé 6 years ago
parent
commit
333a0f5f90
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      react/features/base/conference/actions.js

+ 5
- 0
react/features/base/conference/actions.js View File

@@ -15,6 +15,7 @@ import {
15 15
     participantConnectionStatusChanged,
16 16
     participantJoined,
17 17
     participantLeft,
18
+    participantPresenceChanged,
18 19
     participantRoleChanged,
19 20
     participantUpdated
20 21
 } from '../participants';
@@ -146,6 +147,7 @@ function _addConferenceListeners(conference, dispatch) {
146 147
             conference,
147 148
             id,
148 149
             name: user.getDisplayName(),
150
+            presence: user.getStatus(),
149 151
             role: user.getRole()
150 152
         })));
151 153
     conference.on(
@@ -155,6 +157,9 @@ function _addConferenceListeners(conference, dispatch) {
155 157
     conference.on(
156 158
         JitsiConferenceEvents.USER_ROLE_CHANGED,
157 159
         (...args) => dispatch(participantRoleChanged(...args)));
160
+    conference.on(
161
+        JitsiConferenceEvents.USER_STATUS_CHANGED,
162
+        (...args) => dispatch(participantPresenceChanged(...args)));
158 163
 
159 164
     conference.addCommandListener(
160 165
         AVATAR_ID_COMMAND,

Loading…
Cancel
Save