From 8e6d7d39600f50cf92086f6d00c36acd5af381ec Mon Sep 17 00:00:00 2001 From: damencho Date: Wed, 31 Aug 2016 11:41:17 -0500 Subject: [PATCH] Sends and dispatches avatarId command. --- conference.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/conference.js b/conference.js index 0e3a50d16..0247eec27 100644 --- a/conference.js +++ b/conference.js @@ -48,6 +48,7 @@ const commands = { CONNECTION_QUALITY: "stats", EMAIL: "email", AVATAR_URL: "avatar-url", + AVATAR_ID: "avatar-id", ETHERPAD: "etherpad", SHARED_VIDEO: "shared-video", CUSTOM_ROLE: "custom-role" @@ -758,6 +759,8 @@ export default { let avatarUrl = APP.settings.getAvatarUrl(); avatarUrl && sendData(this.commands.defaults.AVATAR_URL, avatarUrl); + !email && sendData( + this.commands.defaults.AVATAR_ID, APP.settings.getAvatarId()); let nick = APP.settings.getDisplayName(); if (config.useNicks && !nick) { @@ -1257,6 +1260,11 @@ export default { APP.UI.setUserAvatarUrl(from, data.value); }); + room.addCommandListener(this.commands.defaults.AVATAR_ID, + (data, from) => { + APP.UI.setUserAvatarID(from, data.value); + }); + APP.UI.addListener(UIEvents.NICKNAME_CHANGED, changeLocalDisplayName); APP.UI.addListener(UIEvents.START_MUTED_CHANGED,