1
0
mirror of https://github.com/mastodon/mastodon synced 2024-11-23 14:46:18 +09:00

Do not change follow counters when already following (#32622)

This commit is contained in:
David Roetzel 2024-10-22 14:49:10 +02:00 committed by GitHub
parent 18659f8163
commit 029c99bd7b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -57,7 +57,10 @@ export const accountsReducer: Reducer<typeof initialState> = (
return state.setIn([action.payload.id, 'hidden'], false);
else if (importAccounts.match(action))
return normalizeAccounts(state, action.payload.accounts);
else if (followAccountSuccess.match(action)) {
else if (
followAccountSuccess.match(action) &&
!action.payload.alreadyFollowing
) {
return state
.update(action.payload.relationship.id, (account) =>
account?.update('followers_count', (n) => n + 1),