From 9d288d482d4a608711e7348f40e13acc88013911 Mon Sep 17 00:00:00 2001 From: juliajforesti Date: Tue, 23 Sep 2025 14:37:49 -0300 Subject: [PATCH 1/4] fix: add `playNewRoomLoop` to CustomSoundContext --- .../providers/CustomSoundProvider/CustomSoundProvider.tsx | 1 + packages/ui-contexts/src/CustomSoundContext.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/apps/meteor/client/providers/CustomSoundProvider/CustomSoundProvider.tsx b/apps/meteor/client/providers/CustomSoundProvider/CustomSoundProvider.tsx index e06dd7a354a19..5ce326406dd4b 100644 --- a/apps/meteor/client/providers/CustomSoundProvider/CustomSoundProvider.tsx +++ b/apps/meteor/client/providers/CustomSoundProvider/CustomSoundProvider.tsx @@ -75,6 +75,7 @@ const CustomSoundProvider = ({ children }: CustomSoundProviderProps) => { const contextValue = useMemo(() => { const notificationSounds = { playNewRoom: () => play(newRoomNotification, { loop: false, volume: formatVolume(notificationsSoundVolume) }), + playNewRoomLoop: () => play(newRoomNotification, { loop: true, volume: formatVolume(notificationsSoundVolume) }), playNewMessage: () => play(newMessageNotification, { loop: false, volume: formatVolume(notificationsSoundVolume) }), playNewMessageCustom: (soundId: ICustomSound['_id']) => play(soundId, { loop: false, volume: formatVolume(notificationsSoundVolume) }), diff --git a/packages/ui-contexts/src/CustomSoundContext.ts b/packages/ui-contexts/src/CustomSoundContext.ts index a1a0d84d9e69f..db8d062ae8c95 100644 --- a/packages/ui-contexts/src/CustomSoundContext.ts +++ b/packages/ui-contexts/src/CustomSoundContext.ts @@ -30,6 +30,7 @@ export type CustomSoundContextValue = { }; notificationSounds: { playNewRoom: () => void; + playNewRoomLoop: () => void; playNewMessage: () => void; playNewMessageLoop: () => void; stopNewRoom: () => void; @@ -60,6 +61,7 @@ export const CustomSoundContext = createContext({ }, notificationSounds: { playNewRoom: () => undefined, + playNewRoomLoop: () => undefined, playNewMessage: () => undefined, playNewMessageLoop: () => undefined, stopNewRoom: () => undefined, From bf87aa035e7b060f524dfc84d5ddd09e5c87cb08 Mon Sep 17 00:00:00 2001 From: juliajforesti Date: Tue, 23 Sep 2025 14:38:17 -0300 Subject: [PATCH 2/4] fix: replace `playNewMessageLoop` with `playNewRoomLoop` in `useOmnichannelContinuousSoundNotification` --- .../client/hooks/useOmnichannelContinuousSoundNotification.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/meteor/client/hooks/useOmnichannelContinuousSoundNotification.ts b/apps/meteor/client/hooks/useOmnichannelContinuousSoundNotification.ts index d565aa74902d8..ab09698094b63 100644 --- a/apps/meteor/client/hooks/useOmnichannelContinuousSoundNotification.ts +++ b/apps/meteor/client/hooks/useOmnichannelContinuousSoundNotification.ts @@ -19,7 +19,7 @@ export const useOmnichannelContinuousSoundNotification = (queue: T[]) => { return; } - notificationSounds.playNewMessageLoop(); + notificationSounds.playNewRoomLoop(); return () => { notificationSounds.stopNewRoom(); From 7b9e77eb6782ec586a8feb9e8105e52ad3c7da88 Mon Sep 17 00:00:00 2001 From: juliajforesti Date: Tue, 23 Sep 2025 14:48:20 -0300 Subject: [PATCH 3/4] chore: changeset --- .changeset/grumpy-points-deliver.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/grumpy-points-deliver.md diff --git a/.changeset/grumpy-points-deliver.md b/.changeset/grumpy-points-deliver.md new file mode 100644 index 0000000000000..167351ebef565 --- /dev/null +++ b/.changeset/grumpy-points-deliver.md @@ -0,0 +1,6 @@ +--- +'@rocket.chat/ui-contexts': patch +'@rocket.chat/meteor': patch +--- + +Adjusts custom sound loop on omnichannel continuous notification to play `New room` loop instead of `New message` loop From 1f5f93b6d519f4598099348c3db8735b0813fdff Mon Sep 17 00:00:00 2001 From: juliajforesti Date: Wed, 1 Oct 2025 09:46:46 -0300 Subject: [PATCH 4/4] fix: remove `playNewMessageLoop` --- .../providers/CustomSoundProvider/CustomSoundProvider.tsx | 1 - packages/ui-contexts/src/CustomSoundContext.ts | 2 -- 2 files changed, 3 deletions(-) diff --git a/apps/meteor/client/providers/CustomSoundProvider/CustomSoundProvider.tsx b/apps/meteor/client/providers/CustomSoundProvider/CustomSoundProvider.tsx index 5ce326406dd4b..be9606d2d3657 100644 --- a/apps/meteor/client/providers/CustomSoundProvider/CustomSoundProvider.tsx +++ b/apps/meteor/client/providers/CustomSoundProvider/CustomSoundProvider.tsx @@ -79,7 +79,6 @@ const CustomSoundProvider = ({ children }: CustomSoundProviderProps) => { playNewMessage: () => play(newMessageNotification, { loop: false, volume: formatVolume(notificationsSoundVolume) }), playNewMessageCustom: (soundId: ICustomSound['_id']) => play(soundId, { loop: false, volume: formatVolume(notificationsSoundVolume) }), - playNewMessageLoop: () => play(newMessageNotification, { loop: true, volume: formatVolume(notificationsSoundVolume) }), stopNewRoom: () => stop(newRoomNotification), stopNewMessage: () => stop(newMessageNotification), }; diff --git a/packages/ui-contexts/src/CustomSoundContext.ts b/packages/ui-contexts/src/CustomSoundContext.ts index db8d062ae8c95..a8c7a64f844e0 100644 --- a/packages/ui-contexts/src/CustomSoundContext.ts +++ b/packages/ui-contexts/src/CustomSoundContext.ts @@ -32,7 +32,6 @@ export type CustomSoundContextValue = { playNewRoom: () => void; playNewRoomLoop: () => void; playNewMessage: () => void; - playNewMessageLoop: () => void; stopNewRoom: () => void; stopNewMessage: () => void; playNewMessageCustom: (soundId: ICustomSound['_id']) => void; @@ -63,7 +62,6 @@ export const CustomSoundContext = createContext({ playNewRoom: () => undefined, playNewRoomLoop: () => undefined, playNewMessage: () => undefined, - playNewMessageLoop: () => undefined, stopNewRoom: () => undefined, stopNewMessage: () => undefined, playNewMessageCustom: () => undefined,