feat(config) add gravatar config object (#11509)
This commit is contained in:
parent
64d44f0ac2
commit
36578696bb
13
config.js
13
config.js
|
@ -586,8 +586,17 @@ var config = {
|
|||
// Array with avatar URL prefixes that need to use CORS.
|
||||
// corsAvatarURLs: [ 'https://www.gravatar.com/avatar/' ],
|
||||
|
||||
// Base URL for a Gravatar-compatible service. Defaults to libravatar.
|
||||
// gravatarBaseURL: 'https://seccdn.libravatar.org/avatar/',
|
||||
// Base URL for a Gravatar-compatible service. Defaults to Gravatar.
|
||||
// DEPRECATED! Use `gravatar.baseUrl` instead.
|
||||
// gravatarBaseURL: 'https://www.gravatar.com/avatar/',
|
||||
|
||||
// Setup for Gravatar-compatible services.
|
||||
// gravatar: {
|
||||
// // Defaults to Gravatar.
|
||||
// baseUrl: 'https://www.gravatar.com/avatar/',
|
||||
// // True if Gravatar should be disabled.
|
||||
// disabled: false
|
||||
// },
|
||||
|
||||
// App name to be displayed in the invitation email subject, as an alternative to
|
||||
// interfaceConfig.APP_NAME.
|
||||
|
|
|
@ -163,6 +163,7 @@ export default [
|
|||
'gatherStats',
|
||||
'giphy',
|
||||
'googleApiApplicationClientID',
|
||||
'gravatar.disabled',
|
||||
'hiddenPremeetingButtons',
|
||||
'hideConferenceSubject',
|
||||
'hideDisplayName',
|
||||
|
|
|
@ -30,10 +30,13 @@ const AVATAR_CHECKER_FUNCTIONS = [
|
|||
return participant && participant.avatarURL ? participant.avatarURL : null;
|
||||
},
|
||||
(participant, store) => {
|
||||
if (participant && participant.email) {
|
||||
// TODO: remove once libravatar has deployed their new scaled up infra. -saghul
|
||||
const gravatarBaseURL
|
||||
= store.getState()['features/base/config'].gravatarBaseURL ?? GRAVATAR_BASE_URL;
|
||||
const config = store.getState()['features/base/config'];
|
||||
const isGravatarDisabled = config.gravatar?.disabled;
|
||||
|
||||
if (participant && participant.email && !isGravatarDisabled) {
|
||||
const gravatarBaseURL = config.gravatar?.baseUrl
|
||||
|| config.gravatarBaseURL
|
||||
|| GRAVATAR_BASE_URL;
|
||||
|
||||
return getGravatarURL(participant.email, gravatarBaseURL);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue