diff --git a/web/push-notif/push-notifs-handler.js b/web/push-notif/push-notifs-handler.js --- a/web/push-notif/push-notifs-handler.js +++ b/web/push-notif/push-notifs-handler.js @@ -28,6 +28,7 @@ import { useStaffCanSee } from '../utils/staff-utils.js'; declare var baseURL: string; +declare var olmFilename: string; function useCreateDesktopPushSubscription() { const dispatchActionPromise = useDispatchActionPromise(); @@ -85,7 +86,8 @@ const origin = window.location.origin; const olmWasmDirPath = `${origin}${baseURL}${WORKERS_MODULES_DIR_PATH}`; - const olmWasmPath = `${olmWasmDirPath}/${DEFAULT_OLM_FILENAME}`; + const olmWasmFilename = olmFilename ? olmFilename : DEFAULT_OLM_FILENAME; + const olmWasmPath = `${olmWasmDirPath}/${olmWasmFilename}`; workerRegistration.active?.postMessage({ olmWasmPath, staffCanSee }); const subscription = await workerRegistration.pushManager.subscribe({