Commit Graph
26 Commits
Author SHA1 Message Date
7w1 30798ac266 typecheck and cleanup 2026-05-18 23:25:38 -05:00
7w1 e25ce4e5dd extract a bunch of things into their own files and some tests 2026-05-18 20:42:35 -05:00
7w1 b74a8406fc call notif improvements 2026-05-14 15:27:03 -05:00
hazre d4474cc474 fix: avoid post-login preview stalls when service worker registration fails 2026-04-23 00:49:32 +02:00
hazre 840ff239b2 refactor: align matrix event types with sdk primitives 2026-04-21 22:29:46 +02:00
hazre fed60b48b9 chore: scope no-console ignores to files 2026-04-19 17:04:29 +02:00
hazre fecf22ad5a chore: drop stale oxlint suppressions 2026-04-19 16:47:28 +02:00
7w1 9636e7389d swap to .config.ts and remove useless script and pushnotification lint fixes 2026-04-17 12:30:04 -05:00
7w1 27eaadf9ae typecheck and linting fixes 2026-04-17 00:37:15 -05:00
7w1 b13c9b61d4 formatting 2026-04-16 22:38:18 -05:00
7w1 1717ca872f migrate to oxlint and oxfmt
ran formatter
fixed lint issues, primarily getting rid of "any"s and swapping to .toSorted()
2026-04-16 22:15:13 -05:00
7w1 011052214e DM Calls (#165)
* Accepting call things & placement in dms

* evil things to make liner happy

* be happy

* make ringtone stfu

* add room call button and make popup not popup when calling yourself

* support msc4075 maybe possibly idk

* happy lint make

* play sound on outgoing call

* resizeable dm call window

* add custom ringtone and fix audio looping forever

* notifications that will total work trust

* make ringtone and modal stuff actually work after someone leaves call

* hide button for rooms with no perms

* changeset

* update formatting things to work with new controls

* update control styling for mobile

* fix voice appearing in normal voice room chats

* fix non-interactable element call elements

* redo prescreen controls for mobile and dms

* only join call rooms automatically
2026-03-11 21:17:51 -05:00
Evie Gauthier d87d720c7a fix: notification delivery bugs (push sound, OS notifications, in-app audio, media session)
- resolveSilent = () => false — OS/Sygnal handles push sound entirely; the
  in-app sound setting no longer affects push notification sound
- remove notificationSoundEnabled from SW postMessage payload
- move OS notification block before visibilityState guard so desktop
  notifications fire even when the browser window is minimised
- pass isEncryptedRoom:false for in-app banner preview — events are already
  decrypted by the SDK so the actual message body is always shown
- call clearMediaSessionQuickly() after play() to dismiss the iOS lock screen
  media player; only clears playbackState if no real media metadata is set
2026-03-09 21:39:49 -04:00
Evie Gauthier f9b452bde1 fix(notifications): SW push deep-links, visibility suppression, settings decoupling, nav fix
- Rewrite notificationclick to deep-link via /to/:user_id/:room_id/:event_id so
  the correct account is activated on cold PWA launch (ToRoomEvent -> pendingNotificationAtom)
- Suppress OS/SW push notification when the app window is already visible;
  track visibility via postMessage from the app on visibilitychange
- Remove preferPushOnMobile dead code
- Add useSystemNotifications setting (desktop-only, default true on desktop);
  split it out from useInAppNotifications so pill and OS notifications are
  independently controlled
- Settings UI: desktop shows In-App + System Notifications; mobile shows
  In-App + Push Notifications; each hides the irrelevant third toggle
- Fix InviteNotifications / MessageNotifications to gate OS notifications on
  useSystemNotifications + !mobileOrTablet(); pill remains gated on useInAppNotifications
- Fix NotificationJumper: bypass useRoomNavigate (which routes through space
  path) -- navigate directly via getHomeRoomPath / getDirectRoomPath so tapping
  a pill banner on mobile opens the room timeline, not the space-nav panel
- When the app is already open, use postMessage({ type: notificationClick })
  from SW to the running window; new ServiceWorkerClickHandler component handles
  it with the same setActiveSessionId + setPending path as the pill flow;
  /to/ URL kept as cold-launch fallback only
2026-03-05 19:13:31 -05:00
Evie Gauthier c996e5e31b fix(notifications): iOS reliability, SW click handling, and account switching
- HandleNotificationClick moved outside ClientRoot loading gate so SW postMessages
  are never dropped during account-switch reloads
- iOS Safari event.source=null guard removed; type-check used instead
- ToRoomEvent simplified: writes pendingNotificationAtom + sets active session,
  delegates navigation to NotificationJumper
- NotificationJumper: jumpingRef prevents repeated navigation; stable performJumpRef
  avoids re-registering listeners on every atom change during account switch
- BackgroundNotifications: uses SW showNotification for reliable tap routing on iOS;
  dedupeId is now userId+eventId scoped; visibility guard prevents backgrounded
  in-app popups; ref pattern avoids stale closure on settings
- SW: persist/restore notification settings across iOS SW restarts via Cache API;
  group notifications by room (tag + renotify); prefer navigate() over postMessage
  when available; prefer visible tab on notificationclick
- pushNotification: resolveSilent respects tweaks.sound; recipientId in title;
  fallbackNotification removed (redundant)
- RoomTimeline: use ref for handleOpenEvent to stop re-pulling on every new message
2026-03-04 22:24:19 -05:00
Evie Gauthier 775a17e5d0 Add toggle-able message previews to notifictions 2026-03-03 10:36:38 -05:00
Evie Gauthier bc2ff06380 Pull in upstream changes and run validations 2026-03-02 18:40:06 -05:00
Evie Gauthier 58e92c22f9 Fix issues with in-app and push at same time, and properly switch to correct session before opening room on click 2026-03-02 14:19:18 -05:00
Evie Gauthier 49c661b70f Combine push notifications with the background notification handler 2026-03-02 14:10:25 -05:00
Kris Hu 09bd903398 add m.sticker support in push notification 2026-02-15 19:06:46 -06:00
Kris Hu 3d792f34f9 lint: minor error during merging 2026-02-15 19:06:46 -06:00
Kris Hu ad723f6b20 lint code 2026-02-15 19:06:46 -06:00
Kris Hu f66545bbd8 add a fallback push notification
so that a notification will always be generated from a push event,
avoiding being killed for privacy policies from browser and os
2026-02-15 19:06:46 -06:00
Kris Hu 75816cf991 fix(sw): only import matrix sdk types 2026-02-15 19:06:46 -06:00
Kris Hu 25d77d5132 fix(push): use unique tag for push notifications 2026-02-15 19:06:45 -06:00
Kris Hu 7083bff113 feature(sw): add invitation support for push notification 2026-02-15 19:06:45 -06:00