Fix remote follow (#2606)
This commit is contained in:
parent
a0735b0e7a
commit
eaec936fa6
8 changed files with 18 additions and 16 deletions
|
|
@ -83,7 +83,7 @@ export default Vue.extend({
|
|||
userId: this.user.id
|
||||
});
|
||||
} else {
|
||||
if (this.user.isLocked && this.user.hasPendingFollowRequestFromYou) {
|
||||
if (this.user.hasPendingFollowRequestFromYou) {
|
||||
this.user = await (this as any).api('following/requests/cancel', {
|
||||
userId: this.user.id
|
||||
});
|
||||
|
|
|
|||
|
|
@ -55,13 +55,15 @@ export default Vue.extend({
|
|||
methods: {
|
||||
onFollow(user) {
|
||||
if (user.id == this.u.id) {
|
||||
this.user.isFollowing = user.isFollowing;
|
||||
this.u.isFollowing = user.isFollowing;
|
||||
this.u.hasPendingFollowRequestFromYou = user.hasPendingFollowRequestFromYou;
|
||||
}
|
||||
},
|
||||
|
||||
onUnfollow(user) {
|
||||
if (user.id == this.u.id) {
|
||||
this.user.isFollowing = user.isFollowing;
|
||||
this.u.isFollowing = user.isFollowing;
|
||||
this.u.hasPendingFollowRequestFromYou = user.hasPendingFollowRequestFromYou;
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -74,7 +76,7 @@ export default Vue.extend({
|
|||
userId: this.u.id
|
||||
});
|
||||
} else {
|
||||
if (this.u.isLocked && this.u.hasPendingFollowRequestFromYou) {
|
||||
if (this.u.hasPendingFollowRequestFromYou) {
|
||||
this.u = await (this as any).api('following/requests/cancel', {
|
||||
userId: this.u.id
|
||||
});
|
||||
|
|
|
|||
|
|
@ -48,12 +48,14 @@ export default Vue.extend({
|
|||
onFollow(user) {
|
||||
if (user.id == this.u.id) {
|
||||
this.u.isFollowing = user.isFollowing;
|
||||
this.u.hasPendingFollowRequestFromYou = user.hasPendingFollowRequestFromYou;
|
||||
}
|
||||
},
|
||||
|
||||
onUnfollow(user) {
|
||||
if (user.id == this.u.id) {
|
||||
this.u.isFollowing = user.isFollowing;
|
||||
this.u.hasPendingFollowRequestFromYou = user.hasPendingFollowRequestFromYou;
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -66,7 +68,7 @@ export default Vue.extend({
|
|||
userId: this.u.id
|
||||
});
|
||||
} else {
|
||||
if (this.u.isLocked && this.u.hasPendingFollowRequestFromYou) {
|
||||
if (this.u.hasPendingFollowRequestFromYou) {
|
||||
this.u = await (this as any).api('following/requests/cancel', {
|
||||
userId: this.u.id
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue