Browse Source

fix updateAuthorList (#1276)

pull/1279/head
Meisam 4 years ago committed by GitHub
parent
commit
2ff9186ee2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      webroot/js/components/chat/chat.js

4
webroot/js/components/chat/chat.js

@ -276,9 +276,9 @@ export default class Chat extends Component { @@ -276,9 +276,9 @@ export default class Chat extends Component {
nameList.push(message.user.displayName);
return nameList;
} else if (type === SOCKET_MESSAGE_TYPES.NAME_CHANGE) {
const { oldName, newName } = message;
const { oldName, user } = message;
const oldNameIndex = nameList.indexOf(oldName);
nameList.splice(oldNameIndex, 1, newName);
nameList.splice(oldNameIndex, 1, user.displayName);
return nameList;
}
return [];

Loading…
Cancel
Save