From 75816cf991e2ffef6891cfc92da8b17ee5f2af87 Mon Sep 17 00:00:00 2001 From: Kris Hu Date: Mon, 14 Jul 2025 22:42:28 +0800 Subject: [PATCH] fix(sw): only import matrix sdk types --- src/sw.ts | 2 +- src/sw/pushNotification.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sw.ts b/src/sw.ts index a58d60c8..e9716e3e 100644 --- a/src/sw.ts +++ b/src/sw.ts @@ -1,7 +1,7 @@ /// import { precacheAndRoute, cleanupOutdatedCaches } from 'workbox-precaching'; import { usePushNotifications } from './sw/pushNotification'; -import { EventType } from 'matrix-js-sdk'; +import { EventType } from "matrix-js-sdk/lib/@types/event"; export type {}; declare const self: ServiceWorkerGlobalScope; diff --git a/src/sw/pushNotification.ts b/src/sw/pushNotification.ts index f1331ff5..8e5073bc 100644 --- a/src/sw/pushNotification.ts +++ b/src/sw/pushNotification.ts @@ -1,4 +1,4 @@ -import { EventType } from "matrix-js-sdk"; +import { EventType } from "matrix-js-sdk/lib/@types/event"; const DEFAULT_NOTIFICATION_ICON = '/public/res/apple/apple-touch-icon-180x180.png'; const DEFAULT_NOTIFICATION_BADGE = '/public/res/apple-touch-icon-72x72.png';