diff options
| author | Ilja <ilja@ilja.space> | 2021-12-12 18:09:21 +0100 |
|---|---|---|
| committer | Ilja <ilja@ilja.space> | 2021-12-12 18:09:21 +0100 |
| commit | 4587f37dd72cfbb75e0fb008237ee3fe430caed1 (patch) | |
| tree | b3dd4e27cbc7403b8395c706e1e21f8a630c1aa8 /src/components/follow_button | |
| parent | a20f1794d0d63497f701d8db91b1b0691fd06d54 (diff) | |
Allow canceling a follow request
When a follow request is sent, but not (yet) accepted, the behaviour is now to cancel the request instead of re sending.
The reason is double
* You couldn't cancel a follow request if you change your mind and the request wasn't answered yet
* Instances don't always correctly process a new follow request when the following is already happening. If something went wrong (e;g. the target server thinks you're following, but your instance thinks you're not yet), it's better to first sent an unfollow. This is the behaviour that Mastodon and most probably most other clients have. Therefore this flow is more tested and expected by other instances.
Diffstat (limited to 'src/components/follow_button')
| -rw-r--r-- | src/components/follow_button/follow_button.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components/follow_button/follow_button.js b/src/components/follow_button/follow_button.js index 95e7cb6b..df42692b 100644 --- a/src/components/follow_button/follow_button.js +++ b/src/components/follow_button/follow_button.js @@ -14,7 +14,7 @@ export default { if (this.inProgress || this.relationship.following) { return this.$t('user_card.follow_unfollow') } else if (this.relationship.requested) { - return this.$t('user_card.follow_again') + return this.$t('user_card.follow_cancel') } else { return this.$t('user_card.follow') } @@ -33,7 +33,7 @@ export default { }, methods: { onClick () { - this.relationship.following ? this.unfollow() : this.follow() + this.relationship.following || this.relationship.requested ? this.unfollow() : this.follow() }, follow () { this.inProgress = true |
