diff options
author | eleith <eleith@users.noreply.github.com> | 2020-11-05 11:29:36 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-05 11:29:36 -0800 |
commit | 9226cb1103ff34ff72cee4faba4be1896eb49db0 (patch) | |
tree | a4e27dd596ebd58ddf477975131a67e038e01e45 /src | |
parent | 0466dd981197d09ae6bae49131b4cb89f5e67b41 (diff) | |
parent | ffddb704dbc5c653bd2c8b4914898f7f8a2585d6 (diff) |
Merge pull request #1906 from eleith/support-gravatar
add support for downloading avatars from gravatar
Diffstat (limited to 'src')
-rw-r--r-- | src/components/ContactDetails/ContactDetailsAvatar.vue | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/components/ContactDetails/ContactDetailsAvatar.vue b/src/components/ContactDetails/ContactDetailsAvatar.vue index b390dda8..8f631eb5 100644 --- a/src/components/ContactDetails/ContactDetailsAvatar.vue +++ b/src/components/ContactDetails/ContactDetailsAvatar.vue @@ -196,11 +196,15 @@ export default { return false }, supportedSocial() { + const emails = this.contact.vCard.getAllProperties('email') // get social networks set for the current contact const available = this.contact.vCard.getAllProperties('x-socialprofile') .map(a => a.jCal[1].type.toString().toLowerCase()) // get list of social networks that allow for avatar download const supported = supportedNetworks.map(v => v.toLowerCase()) + if (emails.length) { + available.push('gravatar') + } // return supported social networks which are set return supported.filter(i => available.includes(i)) .map(j => this.capitalize(j)) |