[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.
This commit is contained in:
Saúl Ibarra Corretgé 2018-06-20 15:45:22 +02:00
parent 47aa14e9f6
commit 333a0f5f90
1 changed files with 5 additions and 0 deletions

View File

@ -15,6 +15,7 @@ import {
participantConnectionStatusChanged,
participantJoined,
participantLeft,
participantPresenceChanged,
participantRoleChanged,
participantUpdated
} from '../participants';
@ -146,6 +147,7 @@ function _addConferenceListeners(conference, dispatch) {
conference,
id,
name: user.getDisplayName(),
presence: user.getStatus(),
role: user.getRole()
})));
conference.on(
@ -155,6 +157,9 @@ function _addConferenceListeners(conference, dispatch) {
conference.on(
JitsiConferenceEvents.USER_ROLE_CHANGED,
(...args) => dispatch(participantRoleChanged(...args)));
conference.on(
JitsiConferenceEvents.USER_STATUS_CHANGED,
(...args) => dispatch(participantPresenceChanged(...args)));
conference.addCommandListener(
AVATAR_ID_COMMAND,