From b740b17de571a60dcad3f0e63614209bcb286222 Mon Sep 17 00:00:00 2001 From: wackbyte Date: Tue, 28 Jan 2025 20:22:19 +0000 Subject: [PATCH] Sync Glitch follow button with Mastodon (#2957) Fixes the follow button saying "Follow back" when it actually will cancel the follow request (mastodon/mastodon#31934). Intentionally omits the "Mutual" state. --- app/javascript/flavours/glitch/components/follow_button.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/flavours/glitch/components/follow_button.tsx b/app/javascript/flavours/glitch/components/follow_button.tsx index 2d4ce2f2b4127d..5365da38381553 100644 --- a/app/javascript/flavours/glitch/components/follow_button.tsx +++ b/app/javascript/flavours/glitch/components/follow_button.tsx @@ -78,10 +78,10 @@ export const FollowButton: React.FC<{ label = intl.formatMessage(messages.edit_profile); } else if (!relationship) { label = ; - } else if (!relationship.following && relationship.followed_by) { - label = intl.formatMessage(messages.followBack); } else if (relationship.following || relationship.requested) { label = intl.formatMessage(messages.unfollow); + } else if (relationship.followed_by) { + label = intl.formatMessage(messages.followBack); } else { label = intl.formatMessage(messages.follow); }