Skip to content

Commit

Permalink
Update publish-alpha (#3104)
Browse files Browse the repository at this point in the history
Co-authored-by: Kaustubh Kumar <[email protected]>
  • Loading branch information
github-actions[bot] and KaustubhKumar05 authored Jul 19, 2024
1 parent e7479bc commit 6b6cd02
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/react-sdk/src/hooks/useAwayNotifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ import { useHMSStore } from '../primitives/HmsRoomProvider';
export const useAwayNotifications = () => {
const localPeerRoleName = useHMSStore(selectLocalPeerRoleName);
const requestPermission = useCallback(async () => {
if (!Notification || Notification?.permission === 'granted' || localPeerRoleName === '__internal_recorder') {
if (
!Notification ||
Notification?.permission === 'granted' ||
!localPeerRoleName ||
localPeerRoleName === '__internal_recorder'
) {
return;
}
await Notification.requestPermission();
Expand Down

0 comments on commit 6b6cd02

Please sign in to comment.