Skip to content

Fix self follow button in account lists#36

Merged
cbl merged 1 commit into
mainfrom
fix/self-follow
Apr 24, 2026
Merged

Fix self follow button in account lists#36
cbl merged 1 commit into
mainfrom
fix/self-follow

Conversation

@cbl

@cbl cbl commented Apr 23, 2026

Copy link
Copy Markdown
Member

Your own account showed a Follow button in search results, explore/people, and every AccountCardList (followers, following, reblogs, favourites).

Fix

  • useAuth — new isCurrentUser(accountId) predicate. Null/undefined-safe.
  • AccountCardList.vue, explore/people.vue, search.vue — Follow button guarded by !isCurrentUser(account.id). One helper, three guards, covers all six list surfaces.
  • AccountList.vue (generic UserSuggestion without id) left alone; not used for real accounts.

Tests

  • Unit: useAuth-isCurrentUser.test.ts — 4 cases (not logged in, match, mismatch, nullish).
  • E2E: profile/follow-button-self.spec.ts — search and explore/people, logged-in Jane's row has no Follow button.

@cbl cbl merged commit 54a0cea into main Apr 24, 2026
2 checks passed
@cbl cbl deleted the fix/self-follow branch April 24, 2026 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant