Browse Source

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).
master
Дамян Минков 8 years ago
parent
commit
345fcefa7d
3 changed files with 14 additions and 3 deletions
  1. 12
    1
      modules/UI/UI.js
  2. 1
    1
      package-lock.json
  3. 1
    1
      package.json

+ 12
- 1
modules/UI/UI.js View File

27
 import { JitsiTrackErrors } from '../../react/features/base/lib-jitsi-meet';
27
 import { JitsiTrackErrors } from '../../react/features/base/lib-jitsi-meet';
28
 import {
28
 import {
29
     getLocalParticipant,
29
     getLocalParticipant,
30
+    participantPresenceChanged,
30
     showParticipantJoinedNotification
31
     showParticipantJoinedNotification
31
 } from '../../react/features/base/participants';
32
 } from '../../react/features/base/participants';
32
 import { openDisplayNamePrompt } from '../../react/features/display-name';
33
 import { openDisplayNamePrompt } from '../../react/features/display-name';
475
 UI.addUser = function(user) {
476
 UI.addUser = function(user) {
476
     const id = user.getId();
477
     const id = user.getId();
477
     const displayName = user.getDisplayName();
478
     const displayName = user.getDisplayName();
479
+    const status = user.getStatus();
478
 
480
 
479
-    APP.store.dispatch(showParticipantJoinedNotification(displayName));
481
+    if (status) {
482
+        // if user has initial status dispatch it
483
+        // and skip 'connected' notifications
484
+        APP.store.dispatch(participantPresenceChanged(id, status));
485
+
486
+        // FIXME: move updateUserStatus in participantPresenceChanged action
487
+        UI.updateUserStatus(user, status);
488
+    } else {
489
+        APP.store.dispatch(showParticipantJoinedNotification(displayName));
490
+    }
480
 
491
 
481
     if (!config.startAudioMuted
492
     if (!config.startAudioMuted
482
         || config.startAudioMuted > APP.conference.membersCount) {
493
         || config.startAudioMuted > APP.conference.membersCount) {

+ 1
- 1
package-lock.json View File

10991
       }
10991
       }
10992
     },
10992
     },
10993
     "lib-jitsi-meet": {
10993
     "lib-jitsi-meet": {
10994
-      "version": "github:jitsi/lib-jitsi-meet#1c743d65eeccbbd63c765dc84d832112c907422a",
10994
+      "version": "github:jitsi/lib-jitsi-meet#365bd886ee9de81f5d9bd731a57e3b75ab0e766f",
10995
       "requires": {
10995
       "requires": {
10996
         "async": "0.9.0",
10996
         "async": "0.9.0",
10997
         "current-executing-script": "0.1.3",
10997
         "current-executing-script": "0.1.3",

+ 1
- 1
package.json View File

46
     "js-md5": "0.6.1",
46
     "js-md5": "0.6.1",
47
     "jssha": "2.2.0",
47
     "jssha": "2.2.0",
48
     "jwt-decode": "2.2.0",
48
     "jwt-decode": "2.2.0",
49
-    "lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#1c743d65eeccbbd63c765dc84d832112c907422a",
49
+    "lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#365bd886ee9de81f5d9bd731a57e3b75ab0e766f",
50
     "lodash": "4.17.4",
50
     "lodash": "4.17.4",
51
     "nuclear-js": "1.4.0",
51
     "nuclear-js": "1.4.0",
52
     "postis": "2.2.0",
52
     "postis": "2.2.0",

Loading…
Cancel
Save