Skip to content

Commit 00b0dad

Browse files
committed
Unfollow user if they leave
1 parent ab2e9f6 commit 00b0dad

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/app/src/app/overmind/namespaces/live/liveMessageOperators.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,11 @@ export const onUserLeft: Operator<LiveMessage<{
129129
return;
130130
}
131131

132+
if (state.live.followingUserId === data.left_user_id) {
133+
// Unfollow user if they are the one who left
134+
actions.live.onStopFollow();
135+
}
136+
132137
if (!state.live.notificationsHidden) {
133138
const { users } = state.live.roomInfo;
134139
const user = users ? users.find(u => u.id === data.left_user_id) : null;

0 commit comments

Comments
 (0)