Skip to content

Fix DM notifications, encrypted events, and enable reaction notifications#178

Merged
7w1 merged 3 commits intoSableClient:devfrom
Just-Insane:feat/notification-improvements
Mar 12, 2026
Merged

Fix DM notifications, encrypted events, and enable reaction notifications#178
7w1 merged 3 commits intoSableClient:devfrom
Just-Insane:feat/notification-improvements

Conversation

@Just-Insane
Copy link
Contributor

@Just-Insane Just-Insane commented Mar 11, 2026

This PR fixes several notification issues and adds support for encrypted event and reaction notifications:

DM Notification Detection

  • Fix DM detection with sliding sync: Use m.direct account data instead of push rules - Fixes Sliding sync breaks notifications #48
  • Classic sync parity: Add fallback detection using member count heuristic for untagged DMs
  • DM list auto-sorting: Automatically re-sort DM list by recent activity

Badge Counting

  • Fix badge counting for unvisited rooms: Add timeline activity fallback when read receipts are missing - Fixes Notification Badges behave incorrectly #41
  • Fix account switcher badge: Show highlight count (not total) when badge is green

Encrypted Event Notifications

  • Desktop notifications: Listen to MatrixEventEvent.Decrypted for proper encrypted event notifications
  • Mobile notifications: Show decrypted content instead of "Encrypted Message"

Reaction Notifications

  • Enable reaction notifications: Add m.reaction to notification event types
  • Show reaction emoji: Display "Reacted with 👍" instead of "new message" in notification preview

UI Improvements

  • Update terminology: Change "1-to-1 Chats" to "Direct Messages" in notification settings

Known Issues

  • Background account notifications: Encrypted rooms in backgrounded accounts still not working
  • Mobile keyboard banner positioning: Keyboard still hides notification banners on iOS

@Just-Insane Just-Insane requested a review from a team March 11, 2026 15:06
@Just-Insane Just-Insane force-pushed the feat/notification-improvements branch from a8bcb35 to a9757ba Compare March 11, 2026 15:24
@Just-Insane Just-Insane changed the title Fix DM notification detection and badge counting with sliding sync Fix DM notification detection and badge counting Mar 11, 2026
@Just-Insane Just-Insane marked this pull request as draft March 11, 2026 17:55
@Just-Insane Just-Insane force-pushed the feat/notification-improvements branch from 7ce32e2 to 7b8622b Compare March 11, 2026 17:59
@Just-Insane Just-Insane changed the title Fix DM notification detection and badge counting Fix DM notifications, encrypted events, and enable reaction notifications Mar 11, 2026
@Just-Insane Just-Insane force-pushed the feat/notification-improvements branch from d0d4c9a to 2e85725 Compare March 11, 2026 20:15
- Fix DM notifications using multiple detection signals (m.direct + member count heuristic)
- Fix encrypted event handling with proper event type checking and decryption
- Use fixupNotifications() to reconcile Sliding Sync notification count drift
- Force DM notifications for all messages (excluding mute/mentions-only settings)
- Implement robust stale count detection and correction for accurate badge numbers
- Add timeline walking fallback for computing real counts when SDK counters are stale
- Improve notification type detection for DMs with proper mute checks
- Show in-app banner for background account notifications when app is visible
- Add sound notifications for all accounts (active and background)
- Always force reaction notifications to show for all room types
- Improve background notification routing - build payload first, then route by visibility

Known Issues:
- Background account notifications: System/push notifications do not work when app is hidden
- Mobile keyboard banner positioning: Banner not properly positioned when keyboard is open on iOS
@Just-Insane Just-Insane force-pushed the feat/notification-improvements branch from 986c6b4 to 976d2e8 Compare March 11, 2026 20:34
@Just-Insane Just-Insane marked this pull request as ready for review March 11, 2026 20:37
@DidiDidi129
Copy link
Contributor

Wow, nice work!

@Just-Insane
Copy link
Contributor Author

Found a bug in the reactions code - we notify for all reactions, not just reactions on your own messages. Will fix.

@Just-Insane Just-Insane marked this pull request as draft March 12, 2026 00:40
@Just-Insane Just-Insane marked this pull request as ready for review March 12, 2026 00:50
@7w1 7w1 merged commit 1ce6529 into SableClient:dev Mar 12, 2026
6 checks passed
@Just-Insane Just-Insane deleted the feat/notification-improvements branch March 12, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sliding sync breaks notifications Notification Badges behave incorrectly

3 participants