Skip to content

Background service to keep Nostr subs alive + relay wake-up via silent push #147

Description

@ermeme

Milestone: 3 — Protocol gaps
Type: protocol / mobile
Priority: high

v2's push notification service exists (FCM background handler, deep-link routing on tap), but there is no Rust-side background service that keeps relay subscriptions alive or wakes them up on a silent push. Result: pushes arrive, but the trade state does not actually update in background because no one is listening to the relay.

v1 has lib/background/ with platform implementations (mobile + desktop) and documents this in BACKGROUND_NOTIFICATIONS_FIX.md.

Scope

  • Define an AbstractBackgroundService analogous to v1.
  • On silent FCM/APNs push, wake the relay subscription long enough to decrypt the corresponding event, persist it, and emit on_new_message / on_trade_updated.
  • On desktop, keep a long-running subscription via a tray daemon or systemd-style service.
  • Web: best effort via service worker (out of scope for first iteration).

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: notificationsPush and in-app notificationsarea: protocolMostro protocol, transport, dispatcherfeatureNew functionalitymobileSpecific to Android / iOSpriority: highHigh priority

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions