Compare commits

...

1 Commits

Author SHA1 Message Date
damencho
6b5e9c0b50 fix(avatar): Drops avatar url and respects url in the token. 2024-08-24 11:41:30 -05:00
5 changed files with 4 additions and 36 deletions

View File

@@ -43,7 +43,6 @@ import {
p2pStatusChanged
} from './react/features/base/conference/actions';
import {
AVATAR_URL_COMMAND,
CONFERENCE_LEAVE_REASONS,
EMAIL_COMMAND
} from './react/features/base/conference/constants';
@@ -182,7 +181,6 @@ window.JitsiMeetScreenObtainer = {
* Known custom conference commands.
*/
const commands = {
AVATAR_URL: AVATAR_URL_COMMAND,
CUSTOM_ROLE: 'custom-role',
EMAIL: EMAIL_COMMAND,
ETHERPAD: 'etherpad'
@@ -1772,17 +1770,6 @@ export default {
}));
});
room.addCommandListener(
this.commands.defaults.AVATAR_URL,
(data, from) => {
APP.store.dispatch(
participantUpdated({
conference: room,
id: from,
avatarURL: data.value
}));
});
room.on(
JitsiConferenceEvents.START_MUTED_POLICY_CHANGED,
({ audio, video }) => {

View File

@@ -489,9 +489,8 @@ function initCommands() {
sendAnalytics(createApiEvent('email.changed'));
APP.conference.changeLocalEmail(email);
},
'avatar-url': avatarUrl => {
sendAnalytics(createApiEvent('avatar.url.changed'));
APP.conference.changeLocalAvatarUrl(avatarUrl);
'avatar-url': () => {
console.warn('Setting avatar url is available when using jwt via context.user.avatar');
},
'send-chat-message': (message, to, ignorePrivacy = false) => {
if (to) {

View File

@@ -72,7 +72,6 @@ import {
} from './actionTypes';
import { setupVisitorStartupMedia } from './actions';
import {
AVATAR_URL_COMMAND,
EMAIL_COMMAND,
JITSI_CONFERENCE_URL_KEY
} from './constants';
@@ -275,13 +274,6 @@ function _addConferenceListeners(conference: IJitsiConference, dispatch: IStore[
botType
})));
conference.addCommandListener(
AVATAR_URL_COMMAND,
(data: { value: string; }, id: string) => dispatch(participantUpdated({
conference,
id,
avatarURL: data.value
})));
conference.addCommandListener(
EMAIL_COMMAND,
(data: { value: string; }, id: string) => dispatch(participantUpdated({

View File

@@ -1,10 +1,3 @@
/**
* The command type for updating a participant's avatar URL.
*
* @type {string}
*/
export const AVATAR_URL_COMMAND = 'avatar-url';
/**
* The command type for updating a participant's email address.
*

View File

@@ -22,7 +22,6 @@ import {
import { setObfuscatedRoom } from './actions';
import {
AVATAR_URL_COMMAND,
EMAIL_COMMAND,
JITSI_CONFERENCE_URL_KEY
} from './constants';
@@ -90,7 +89,9 @@ export function commonUserJoinedHandling(
} else {
const isReplacing = user?.isReplacing();
// the identity and avatar come from jwt and never change in the presence
dispatch(participantJoined({
avatarURL: user.getIdentity()?.user?.avatar,
botType: user.getBotType(),
conference,
id,
@@ -540,15 +541,11 @@ export function sendLocalParticipant(
stateful: IStateful,
conference?: IJitsiConference) {
const {
avatarURL,
email,
features,
name
} = getLocalParticipant(stateful) ?? {};
avatarURL && conference?.sendCommand(AVATAR_URL_COMMAND, {
value: avatarURL
});
email && conference?.sendCommand(EMAIL_COMMAND, {
value: email
});