@ -31,14 +31,16 @@ import EventEmitter from 'events';
import {
import {
AVATAR _ID _COMMAND ,
AVATAR _ID _COMMAND ,
AVATAR _URL _COMMAND ,
AVATAR _URL _COMMAND ,
EMAIL _COMMAND ,
authStatusChanged ,
authStatusChanged ,
commonUserJoinedHandling ,
commonUserLeftHandling ,
conferenceFailed ,
conferenceFailed ,
conferenceJoined ,
conferenceJoined ,
conferenceLeft ,
conferenceLeft ,
conferenceWillJoin ,
conferenceWillJoin ,
conferenceWillLeave ,
conferenceWillLeave ,
dataChannelOpened ,
dataChannelOpened ,
EMAIL _COMMAND ,
lockStateChanged ,
lockStateChanged ,
onStartMutedPolicyChanged ,
onStartMutedPolicyChanged ,
p2pStatusChanged ,
p2pStatusChanged ,
@ -75,14 +77,10 @@ import {
getAvatarURLByParticipantId ,
getAvatarURLByParticipantId ,
getLocalParticipant ,
getLocalParticipant ,
getParticipantById ,
getParticipantById ,
hiddenParticipantJoined ,
hiddenParticipantLeft ,
localParticipantConnectionStatusChanged ,
localParticipantConnectionStatusChanged ,
localParticipantRoleChanged ,
localParticipantRoleChanged ,
MAX _DISPLAY _NAME _LENGTH ,
MAX _DISPLAY _NAME _LENGTH ,
participantConnectionStatusChanged ,
participantConnectionStatusChanged ,
participantJoined ,
participantLeft ,
participantPresenceChanged ,
participantPresenceChanged ,
participantRoleChanged ,
participantRoleChanged ,
participantUpdated
participantUpdated
@ -1694,22 +1692,14 @@ export default {
room . on ( JitsiConferenceEvents . PARTCIPANT _FEATURES _CHANGED ,
room . on ( JitsiConferenceEvents . PARTCIPANT _FEATURES _CHANGED ,
user => APP . UI . onUserFeaturesChanged ( user ) ) ;
user => APP . UI . onUserFeaturesChanged ( user ) ) ;
room . on ( JitsiConferenceEvents . USER _JOINED , ( id , user ) => {
room . on ( JitsiConferenceEvents . USER _JOINED , ( id , user ) => {
const displayName = user . getDisplayName ( ) ;
// The logic shared between RN and web.
commonUserJoinedHandling ( APP . store , room , user ) ;
if ( user . isHidden ( ) ) {
if ( user . isHidden ( ) ) {
APP . store . dispatch ( hiddenParticipantJoined ( id , displayName ) ) ;
return ;
return ;
}
}
APP . store . dispatch ( participantJoined ( {
const displayName = user . getDisplayName ( ) ;
botType : user . getBotType ( ) ,
conference : room ,
id ,
name : displayName ,
presence : user . getStatus ( ) ,
role : user . getRole ( )
} ) ) ;
logger . log ( ` USER ${ id } connnected: ` , user ) ;
logger . log ( ` USER ${ id } connnected: ` , user ) ;
APP . API . notifyUserJoined ( id , {
APP . API . notifyUserJoined ( id , {
@ -1724,13 +1714,13 @@ export default {
} ) ;
} ) ;
room . on ( JitsiConferenceEvents . USER _LEFT , ( id , user ) => {
room . on ( JitsiConferenceEvents . USER _LEFT , ( id , user ) => {
if ( user . isHidden ( ) ) {
// The logic shared between RN and web.
APP . store . dispatch ( hiddenParticipantLeft ( id ) ) ;
commonUserLeftHandling ( APP . store , room , user ) ;
if ( user . isHidden ( ) ) {
return ;
return ;
}
}
APP . store . dispatch ( participantLeft ( id , room ) ) ;
logger . log ( ` USER ${ id } LEFT: ` , user ) ;
logger . log ( ` USER ${ id } LEFT: ` , user ) ;
APP . API . notifyUserLeft ( id ) ;
APP . API . notifyUserLeft ( id ) ;
APP . UI . messageHandler . participantNotification (
APP . UI . messageHandler . participantNotification (