Skip to content
Snippets Groups Projects
Unverified Commit 82951920 authored by ThibG's avatar ThibG Committed by GitHub
Browse files

Fix bell button causing a brief “Cancel follow request” on locked accounts (#14896)

parent 3ea65472
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,7 @@ const initialState = ImmutableMap();
export default function relationships(state = initialState, action) {
switch(action.type) {
case ACCOUNT_FOLLOW_REQUEST:
return state.setIn([action.id, action.locked ? 'requested' : 'following'], true);
return state.getIn([action.id, 'following']) ? state : state.setIn([action.id, action.locked ? 'requested' : 'following'], true);
case ACCOUNT_FOLLOW_FAIL:
return state.setIn([action.id, action.locked ? 'requested' : 'following'], false);
case ACCOUNT_UNFOLLOW_REQUEST:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment