diff --git a/webapp/graphql/UserProfileQuery.js b/webapp/graphql/UserProfileQuery.js
index f0d7720ae..16e7e1440 100644
--- a/webapp/graphql/UserProfileQuery.js
+++ b/webapp/graphql/UserProfileQuery.js
@@ -98,6 +98,10 @@ export default app => {
}
}
}
+ socialMedia {
+ id
+ url
+ }
}
}
`)
diff --git a/webapp/pages/profile/_id/_slug.vue b/webapp/pages/profile/_id/_slug.vue
index 38bf847a2..e516f061b 100644
--- a/webapp/pages/profile/_id/_slug.vue
+++ b/webapp/pages/profile/_id/_slug.vue
@@ -202,6 +202,35 @@
+
+
+
+
+ Where else can I find {{ user.name | truncate(15) }}?
+
+
+
+
+
+
+ {{ link.username }}
+
+
+
+
+
!post.deleted))
+ },
+ socialMediaLinks() {
+ const { socialMedia = [] } = this.user
+ return socialMedia.map(socialMedia => {
+ const { url } = socialMedia
+ const matches = url.match(
+ /^(?:https?:\/\/)?(?:[^@\n])?(?:www\.)?([^:\/\n?]+)/g
+ )
+ const [domain] = matches || []
+ const favicon = domain ? `${domain}/favicon.ico` : null
+ const username = url.split('/')[3]
+ return { url, username, favicon }
+ })
}
},
watch: {