feat: Add telegram user name in contact details (#10259)

Fixes https://linear.app/chatwoot/issue/CW-3648/chore-show-telegram-user-name-next-to-the-contact-details-if-available
This commit is contained in:
Muhsin Keloth
2024-10-10 22:05:08 +05:30
committed by GitHub
parent 220a947380
commit a2f32f7232
2 changed files with 8 additions and 3 deletions

View File

@@ -85,9 +85,13 @@ export default {
const { const {
social_profiles: socialProfiles, social_profiles: socialProfiles,
screen_name: twitterScreenName, screen_name: twitterScreenName,
social_telegram_user_name: telegramUsername,
} = this.additionalAttributes; } = this.additionalAttributes;
return {
return { twitter: twitterScreenName, ...(socialProfiles || {}) }; twitter: twitterScreenName,
telegram: telegramUsername,
...(socialProfiles || {}),
};
}, },
// Delete Modal // Delete Modal
confirmDeleteMessage() { confirmDeleteMessage() {

View File

@@ -14,6 +14,7 @@ export default {
{ key: 'linkedin', icon: 'linkedin', link: 'https://linkedin.com/' }, { key: 'linkedin', icon: 'linkedin', link: 'https://linkedin.com/' },
{ key: 'github', icon: 'github', link: 'https://github.com/' }, { key: 'github', icon: 'github', link: 'https://github.com/' },
{ key: 'instagram', icon: 'instagram', link: 'https://instagram.com/' }, { key: 'instagram', icon: 'instagram', link: 'https://instagram.com/' },
{ key: 'telegram', icon: 'telegram', link: 'https://t.me/' },
], ],
}; };
}, },
@@ -29,7 +30,7 @@ export default {
<!-- eslint-disable-next-line vue/no-root-v-if --> <!-- eslint-disable-next-line vue/no-root-v-if -->
<template> <template>
<div v-if="availableProfiles.length" class="flex items-end mx-0 my-2 gap-3"> <div v-if="availableProfiles.length" class="flex items-end gap-3 mx-0 my-2">
<a <a
v-for="profile in availableProfiles" v-for="profile in availableProfiles"
:key="profile.key" :key="profile.key"