Fix/notification hardening#11
Merged
eleboucher merged 6 commits intoJul 24, 2026
Merged
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
eleboucher
force-pushed
the
fix/notification-hardening
branch
from
July 24, 2026 20:33
9b7aaaf to
92a2442
Compare
11 tasks
charm-cloudhub-social Bot
pushed a commit
to CloudHub-Social/Charm-1.0
that referenced
this pull request
Jul 24, 2026
…Client#1273) <!-- Please read https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before submitting your pull request --> ### Description Fixes several Android push-notification bugs, and bumps `tauri-plugin-notifications` to pick up the matching native fixes (SableClient/tauri-plugin-notifications#11). **Transport routing** - Pass `provider: 'fcm'` / `provider: 'unifiedpush'` explicitly on register, so the plugin routes deterministically instead of inferring from saved state (switching to native no longer keeps using the old UnifiedPush distributor). - `switchBackgroundPushTransport` is break-before-make (deactivate old → register new), which the plugin's single-active-provider guard requires. If the new registration fails, the previous transport is now **restored** instead of leaving the device with no pusher while the UI still says push is on. - Skip no-op mode changes when the resolved provider is unchanged. - `enablePushNotifications` no-ops under Tauri instead of throwing (fixes the SABLE-162 unhandled rejection). **Background notification previews** - Encrypted message bodies could appear in notifications with "show encrypted content" disabled: `isEncryptedRoom` is derived from the local room, which is absent on a cold start from push, so the gate passed and the decrypted body was shown. Encryption is now taken from the fetched event itself. - A notification dismissed while its preview fetch was in flight could reappear ("ghost" notification), the async update now checks the cache is still the live one. - An earlier message no longer stays stuck on the "New message" placeholder when a second push arrives before its preview resolves. - The second (enriching) post is awaited so failures are logged instead of becoming unhandled rejections, and the per-room seen-event set is capped. #### Type of change - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update ### Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings ### AI disclosure: - [ ] Partially AI assisted (clarify which code was AI assisted and briefly explain what it does). - [ ] Fully AI generated (explain what all the generated code does in moderate detail). <!-- Write any explanation required here, but do not generate the explanation using AI!! You must prove you understand what the code in this PR does. -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.