Skip to content

Commit

Permalink
fix: toast cta for hand raise
Browse files Browse the repository at this point in the history
  • Loading branch information
KaustubhKumar05 committed Feb 28, 2024
1 parent d621d05 commit 2a6345b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
HMSNotificationTypes,
HMSRoomState,
selectHasPeerHandRaised,
selectPeerByID,
selectRoomState,
useHMSNotifications,
useHMSStore,
Expand Down Expand Up @@ -32,8 +33,10 @@ export const HandRaisedNotifications = () => {
return;
}
const hasPeerHandRaised = vanillaStore.getState(selectHasPeerHandRaised(notification.data.id));
const peer = vanillaStore.getState(selectPeerByID(notification.data.id));
if (hasPeerHandRaised) {
ToastBatcher.showToast({ notification, type: on_stage_exp ? 'RAISE_HAND_HLS' : 'RAISE_HAND' });
const showCTA = on_stage_exp?.off_stage_roles?.includes(peer?.roleName || '');
ToastBatcher.showToast({ notification, type: showCTA ? 'RAISE_HAND_HLS' : 'RAISE_HAND' });
console.debug('Metadata updated', notification.data);
}
}, [isSubscribing, notification, on_stage_exp, roomState, vanillaStore]);
Expand Down

0 comments on commit 2a6345b

Please sign in to comment.