Sends and dispatches avatarId command.

pull/826/head
damencho 8 years ago
parent 3138748f57
commit 8e6d7d3960
  1. 8
      conference.js

@ -48,6 +48,7 @@ const commands = {
CONNECTION_QUALITY: "stats", CONNECTION_QUALITY: "stats",
EMAIL: "email", EMAIL: "email",
AVATAR_URL: "avatar-url", AVATAR_URL: "avatar-url",
AVATAR_ID: "avatar-id",
ETHERPAD: "etherpad", ETHERPAD: "etherpad",
SHARED_VIDEO: "shared-video", SHARED_VIDEO: "shared-video",
CUSTOM_ROLE: "custom-role" CUSTOM_ROLE: "custom-role"
@ -758,6 +759,8 @@ export default {
let avatarUrl = APP.settings.getAvatarUrl(); let avatarUrl = APP.settings.getAvatarUrl();
avatarUrl && sendData(this.commands.defaults.AVATAR_URL, avatarUrl && sendData(this.commands.defaults.AVATAR_URL,
avatarUrl); avatarUrl);
!email && sendData(
this.commands.defaults.AVATAR_ID, APP.settings.getAvatarId());
let nick = APP.settings.getDisplayName(); let nick = APP.settings.getDisplayName();
if (config.useNicks && !nick) { if (config.useNicks && !nick) {
@ -1257,6 +1260,11 @@ export default {
APP.UI.setUserAvatarUrl(from, data.value); 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.NICKNAME_CHANGED, changeLocalDisplayName);
APP.UI.addListener(UIEvents.START_MUTED_CHANGED, APP.UI.addListener(UIEvents.START_MUTED_CHANGED,

Loading…
Cancel
Save