Skip to content

Commit

Permalink
Update publish-alpha (#3098)
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 0feb299 commit c07d3d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/create-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ on:
description: 'which version to bump eg: prerelease, patch'
required: true
default: 'prerelease'


jobs:
create_pr:
runs-on: ubuntu-latest
steps:
- name: Validate branch
if: github.event.inputs.versionBump != 'prerelease' && github.ref != 'refs/heads/main'
if: github.event.inputs.versionBump != 'prerelease' && github.ref != 'refs/heads/dev'
run: exit 1

- uses: actions/checkout@v3
Expand Down
6 changes: 5 additions & 1 deletion packages/react-sdk/src/hooks/useAwayNotifications.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
// write a hook to use the MDN notifications API to show a notification when the user is away from the page
import { useCallback } from 'react';
import { selectLocalPeerRole } from '@100mslive/hms-video-store';
import { useHMSStore } from '../primitives/HmsRoomProvider';

// Do not prompt if preview is not available. Skips for beam
export const useAwayNotifications = () => {
const localPeerRole = useHMSStore(selectLocalPeerRole)?.name;
const requestPermission = useCallback(async () => {
if (!Notification || Notification?.permission === 'granted') {
if (!Notification || Notification?.permission === 'granted' || localPeerRole === '__internal_recorder') {
return;
}
await Notification.requestPermission();
Expand Down

0 comments on commit c07d3d3

Please sign in to comment.