paweldomas 8a4e6a7ec0 feat: override email, display name and avatar on mobile
Will override email, display name and avatar URL with the values
provided in 'context.user' structure of the JWT token.

Settings will no longer be used to retrieve local display name,
email and avatar URL. Now those values will be obtained from
the /features/base/participants Redux state.

fix(jwt/middleware): use const for default name

fix: wrong default display name on web

ref(base/participants): remove getDisplayName functions

ref(jwt): do not accept unknown user fields
2017-10-13 14:31:44 -05:00

48 lines
1.3 KiB
JavaScript

/**
* The relative path to the default/stock avatar (image) file used on both
* Web/React and mobile/React Native (for the purposes of consistency).
*
* XXX (1) Web/React utilizes relativity on the Jitsi Meet deployment.
* (2) Mobile/React Native utilizes relativity on the local file system at build
* time. Unfortunately, the packager of React Native cannot deal with the
* {@code const} early enough for {@code require} to succeed at runtime.
* Anyway, be sure to synchronize the relative path on Web and mobile for the
* purposes of consistency.
*
* @type {string}
*/
export const DEFAULT_AVATAR_RELATIVE_PATH = 'images/avatar.png';
/**
* Local participant might not have real ID until he joins a conference,
* so use 'local' as its default ID.
*
* @type {string}
*/
export const LOCAL_PARTICIPANT_DEFAULT_ID = 'local';
/**
* The default display name for the local participant.
* TODO Get the from config and/or localized.
* @type {string}
*/
export const LOCAL_PARTICIPANT_DEFAULT_NAME = 'me';
/**
* Max length of the display names.
*
* @type {string}
*/
export const MAX_DISPLAY_NAME_LENGTH = 50;
/**
* The set of possible XMPP MUC roles for conference participants.
*
* @enum {string}
*/
export const PARTICIPANT_ROLE = {
MODERATOR: 'moderator',
NONE: 'none',
PARTICIPANT: 'participant'
};