Skip to content

Commit 687949b

Browse files
siddharthkpCompuIves
authored andcommitted
check notifications settings on user enter (codesandbox#2724)
1 parent 6521dcd commit 687949b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,12 @@ export const onUserEntered: Operator<
6464

6565
const user = data.users.find(u => u.id === data.joined_user_id);
6666

67-
effects.notificationToast.add({
68-
message: `${user.username} joined the live session.`,
69-
status: NotificationStatus.NOTICE,
70-
});
67+
if (!state.live.notificationsHidden) {
68+
effects.notificationToast.add({
69+
message: `${user.username} joined the live session.`,
70+
status: NotificationStatus.NOTICE,
71+
});
72+
}
7173
});
7274

7375
export const onUserLeft: Operator<

0 commit comments

Comments
 (0)