From 345fcefa7d4769e2890c9de81d8c15dd3a34c4fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BC=D1=8F=D0=BD=20=D0=9C=D0=B8=D0=BD=D0=BA?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Mon, 27 Nov 2017 17:05:53 -0600 Subject: [PATCH] On adding participant show the initial status text if any. (#2220) * On adding participant show the initial status text if any. When participant joins and there is an initial status we show it, instead of the connected notification. If initial status is missing proceed with the default user connected notification. * Updates to latest lib-jitsi-meet (365bd886ee). * Adds a fixme comment. * Updates to latest lib-jitsi-meet (365bd886ee). --- modules/UI/UI.js | 13 ++++++++++++- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/modules/UI/UI.js b/modules/UI/UI.js index f89d154c8..f00e18e6f 100644 --- a/modules/UI/UI.js +++ b/modules/UI/UI.js @@ -27,6 +27,7 @@ import { updateDeviceList } from '../../react/features/base/devices'; import { JitsiTrackErrors } from '../../react/features/base/lib-jitsi-meet'; import { getLocalParticipant, + participantPresenceChanged, showParticipantJoinedNotification } from '../../react/features/base/participants'; import { openDisplayNamePrompt } from '../../react/features/display-name'; @@ -475,8 +476,18 @@ UI.getSharedDocumentManager = () => etherpadManager; UI.addUser = function(user) { const id = user.getId(); const displayName = user.getDisplayName(); + const status = user.getStatus(); - APP.store.dispatch(showParticipantJoinedNotification(displayName)); + if (status) { + // if user has initial status dispatch it + // and skip 'connected' notifications + APP.store.dispatch(participantPresenceChanged(id, status)); + + // FIXME: move updateUserStatus in participantPresenceChanged action + UI.updateUserStatus(user, status); + } else { + APP.store.dispatch(showParticipantJoinedNotification(displayName)); + } if (!config.startAudioMuted || config.startAudioMuted > APP.conference.membersCount) { diff --git a/package-lock.json b/package-lock.json index 0fae0ab7a..cd9d1204b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10991,7 +10991,7 @@ } }, "lib-jitsi-meet": { - "version": "github:jitsi/lib-jitsi-meet#1c743d65eeccbbd63c765dc84d832112c907422a", + "version": "github:jitsi/lib-jitsi-meet#365bd886ee9de81f5d9bd731a57e3b75ab0e766f", "requires": { "async": "0.9.0", "current-executing-script": "0.1.3", diff --git a/package.json b/package.json index 5f0c0ee65..fe597474f 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "js-md5": "0.6.1", "jssha": "2.2.0", "jwt-decode": "2.2.0", - "lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#1c743d65eeccbbd63c765dc84d832112c907422a", + "lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#365bd886ee9de81f5d9bd731a57e3b75ab0e766f", "lodash": "4.17.4", "nuclear-js": "1.4.0", "postis": "2.2.0",