Skip to content

Add mobile push notification type controls - #21

Merged
masonasons merged 1 commit into
masonasons:mainfrom
johanntan:feat/mobile-push-types
Sep 7, 2026
Merged

masonasons merged 1 commit into
masonasons:mainfrom
johanntan:feat/mobile-push-types

Conversation

@johanntan

Copy link
Copy Markdown
Contributor

Mobile push notifications currently have one on/off switch and always request all eight supported alert types. This adds individual switches under Settings → Notifications on iOS and Android, so users can, for example, receive mentions while turning off favorites and boosts.

Choices apply to all Mastodon accounts on the device and default to on. They can be changed while push is off, survive restarts, and are applied during subscription creation and renewal. In-app notification lists and sounds stay independent; this feature is specific to mobile push.

  • Share the alert preferences and labels in the core. Save changes as individual patches so rapid toggles do not overwrite one another.
  • Update existing Mastodon subscriptions with PUT, preserving endpoints and keys. Report failures per account and keep saved choices for the next renewal.
  • Renew iOS subscriptions once accounts load and when an account is added; ignore late registration callbacks after push is disabled.
  • Add regression coverage and a changelog entry under 0.5.8.

Validation passed:

  • Shared core build, C-ABI smoke test, and full core suite: 802 checks, 0 failures.
  • Android debug APK build and unit tests: 3 tests passed. A temporary Gradle init script pointed to the nested local NDK installation; no project build configuration was changed for that workaround.
  • Unsigned iOS Debug device build.
  • git diff --check.

Live push delivery with the app closed and VoiceOver/TalkBack behavior still need device verification. Windows was not built locally.

Add eight switches to Settings > Notifications on iOS and Android for mentions,
favorites, boosts, follows, follow requests, poll results, subscribed-account
posts, and post edits. Preferences apply to all Mastodon accounts on the device
and default to enabled to preserve existing behavior.

Persist the alert choices in shared core settings and apply them when creating
or renewing subscriptions. Add a patch command that saves individual changes
and updates active subscriptions without replacing their endpoints or keys.
Serialize updates so rapid changes accumulate, report failures by account, and
retain saved choices for later renewal. Capture account snapshots for updates
so removing an account cannot invalidate an in-flight request.

Renew iOS subscriptions after accounts load and when an account is added. Guard
late mobile registration callbacks after push is disabled. Add the shared alert
catalog, matching native controls, and a user-facing changelog entry.

Cover defaults, persistence, request payloads, rapid changes, partial failures,
shutdown ordering, and restart renewal. Validation passed: 802 core checks,
C-ABI smoke test, Android debug build and three unit tests, and unsigned iOS
Debug device build. Live delivery and screen-reader checks remain for devices.

Co-Authored-By: Codex <noreply@openai.com>
@masonasons
masonasons merged commit 8ac98e6 into masonasons:main Sep 7, 2026
5 checks passed
masonasons pushed a commit that referenced this pull request Sep 7, 2026
Bump the marketing version to 0.5.8 for the TestFlight release. The
feature work (per-type mobile push controls, and the Bluesky link-finding
fix) landed via #21; this carries the version to match the 0.5.8 changelog.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TdQ31PfMPdfTesyUThLjCr
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.

2 participants