summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2019-10-04 19:02:04 -0100
committerGitHub <noreply@github.com>2019-10-04 19:02:04 -0100
commit05134a1c38d8c288f5f96304accd5d313a90fd93 (patch)
tree406bf835e872e4ce7b3dd870b269a1ec4945e2c7 /src
parentd82cb4906b38cc61630f34a3bbfbdd339bc4a55e (diff)
parentc82befe38b92b6f553937bd998df4494a579e4a8 (diff)
Merge pull request #787 from StCyr/bugfix/776/do-not-show-followbutton
FIX: do not show follow button when viewer is same as viewed
Diffstat (limited to 'src')
-rw-r--r--src/components/FollowButton.vue3
-rw-r--r--src/components/ProfileInfo.vue2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/components/FollowButton.vue b/src/components/FollowButton.vue
index f23a91cc..d2c76953 100644
--- a/src/components/FollowButton.vue
+++ b/src/components/FollowButton.vue
@@ -21,7 +21,8 @@
-->
<template>
- <div v-if="!serverData.public && cloudId !== account && actorInfo">
+ <!-- Show button only if user is authenticated and she is not the same as the account viewed -->
+ <div v-if="!serverData.public && actorInfo && actorInfo.viewerLink!='viewer'">
<button v-if="isCurrentUserFollowing" :class="{'icon-loading-small': followLoading}"
@click="unfollow()"
@mouseover="followingText=t('social', 'Unfollow')" @mouseleave="followingText=t('social', 'Following')">
diff --git a/src/components/ProfileInfo.vue b/src/components/ProfileInfo.vue
index c7451f6b..467f7213 100644
--- a/src/components/ProfileInfo.vue
+++ b/src/components/ProfileInfo.vue
@@ -150,7 +150,7 @@ export default {
},
methods: {
followRemote() {
- window.open(OC.generateUrl('/apps/social/api/v1/ostatus/followRemote/' + encodeURI(this.uid)), 'followRemote', 'width=433,height=600toolbar=no,menubar=no,scrollbars=yes,resizable=yes')
+ window.open(OC.generateUrl('/apps/social/api/v1/ostatus/followRemote/' + encodeURI(this.localUid)), 'followRemote', 'width=433,height=600toolbar=no,menubar=no,scrollbars=yes,resizable=yes')
}
}
}