Browse Source

fix(chat) stop using nicknames

We stopped providing a way to set them, so don't render them either.

Also cleanup some leftover config options.
master
Saúl Ibarra Corretgé 4 years ago
parent
commit
29fa4c935e

+ 0
- 1
config.js View File

@@ -678,7 +678,6 @@ var config = {
678 678
      forceJVB121Ratio
679 679
      hiddenDomain
680 680
      ignoreStartMuted
681
-     nick
682 681
      startBitrate
683 682
      */
684 683
 

+ 0
- 1
doc/example-config-files/config.js.example View File

@@ -4,6 +4,5 @@ var config = {
4 4
         muc: 'conference.jitsi.example.com', // FIXME: use XEP-0030
5 5
         bridge: 'jitsi-videobridge.jitsi.example.com' // FIXME: use XEP-0030
6 6
     },
7
-    useNicks: false,
8 7
     bosh: '//jitsi.example.com/http-bind' // FIXME: use xep-0156 for that
9 8
 };

+ 0
- 1
doc/example-config-files/multidomain/config.js.multidomain.example View File

@@ -9,7 +9,6 @@ var config = {
9 9
         muc: 'conference.'+subdomain+'jitsi.example.com', // FIXME: use XEP-0030
10 10
         focus: 'focus.jitsi.example.com',
11 11
     },
12
-    useNicks: false,
13 12
     bosh: '//jitsi.example.com/http-bind', // FIXME: use xep-0156 for that
14 13
     websocket: 'wss://jitsi.example.com/xmpp-websocket'
15 14
 };

+ 0
- 5
modules/UI/UI.js View File

@@ -343,11 +343,6 @@ UI.showLoginPopup = function(callback) {
343 343
     });
344 344
 };
345 345
 
346
-UI.askForNickname = function() {
347
-    // eslint-disable-next-line no-alert
348
-    return window.prompt('Your nickname (optional)');
349
-};
350
-
351 346
 /**
352 347
  * Sets muted audio state for participant
353 348
  */

+ 0
- 1
react/features/base/config/configWhitelist.js View File

@@ -128,7 +128,6 @@ export default [
128 128
     'localRecording',
129 129
     'maxFullResolutionParticipants',
130 130
     'minParticipants',
131
-    'nick',
132 131
     'openBridgeChannel',
133 132
     'opusMaxAverageBitrate',
134 133
     'p2p',

+ 5
- 8
react/features/chat/middleware.js View File

@@ -161,11 +161,10 @@ function _addChatMsgListener(conference, store) {
161 161
 
162 162
     conference.on(
163 163
         JitsiConferenceEvents.MESSAGE_RECEIVED,
164
-        (id, message, timestamp, nick) => {
164
+        (id, message, timestamp) => {
165 165
             _handleReceivedMessage(store, {
166 166
                 id,
167 167
                 message,
168
-                nick,
169 168
                 privateMessage: false,
170 169
                 timestamp
171 170
             });
@@ -179,8 +178,7 @@ function _addChatMsgListener(conference, store) {
179 178
                 id,
180 179
                 message,
181 180
                 privateMessage: true,
182
-                timestamp,
183
-                nick: undefined
181
+                timestamp
184 182
             });
185 183
         }
186 184
     );
@@ -215,7 +213,7 @@ function _handleChatError({ dispatch }, error) {
215 213
  * @param {Object} message - The message object.
216 214
  * @returns {void}
217 215
  */
218
-function _handleReceivedMessage({ dispatch, getState }, { id, message, nick, privateMessage, timestamp }) {
216
+function _handleReceivedMessage({ dispatch, getState }, { id, message, privateMessage, timestamp }) {
219 217
     // Logic for all platforms:
220 218
     const state = getState();
221 219
     const { isOpen: isChatOpen } = state['features/chat'];
@@ -228,10 +226,9 @@ function _handleReceivedMessage({ dispatch, getState }, { id, message, nick, pri
228 226
     // backfilled for a participant that has left the conference.
229 227
     const participant = getParticipantById(state, id) || {};
230 228
     const localParticipant = getLocalParticipant(getState);
231
-    const displayName = participant.name || nick || getParticipantDisplayName(state, id);
229
+    const displayName = getParticipantDisplayName(state, id);
232 230
     const hasRead = participant.local || isChatOpen;
233
-    const timestampToDate = timestamp
234
-        ? new Date(timestamp) : new Date();
231
+    const timestampToDate = timestamp ? new Date(timestamp) : new Date();
235 232
     const millisecondsTimestamp = timestampToDate.getTime();
236 233
 
237 234
     dispatch(addMessage({

Loading…
Cancel
Save