Skip to content

Mobile: compose, render, and notify for @channel/@here channel mentionsΒ #3198

Description

@LordMelkor

πŸ€– Filed by kray's AI agent on his behalf.

Problem

#3197 adds @channel and @here channel-wide mentions (NIP-CM, ["notify","channel"|"here"] marker tag) with relay, CLI, SDK, and desktop support. Mobile is the missing surface β€” mirroring how #2792 tracked mobile support for user groups (#2728).

Today on mobile:

  • A received @channel/@here renders as plain text β€” no mention chip, no visual signal that the message notified the channel.
  • @channel events do reach mobile users' Home mention feed (the feed is relay-side, one row per event), so mobile already benefits passively β€” but the message body doesn't explain why it's in the feed.
  • The composer has no way to send a channel mention: no autocomplete rows for the reserved tokens, no notify tag attached on send.
  • Notification handling: mobile's should_notify_for_event ladder needs the same two NIP-CM rules the desktop ladder got β€” @channel/@here escalate to mention-tier for channel members, and channel mutes suppress them (direct p-tag mentions keep piercing mutes). @here is observation-time live-only (own presence online AND within the 120s freshness window; no retroactive badge).

Scope

  1. Render: chip @channel/@here when the event carries the corresponding notify tag (reserved tokens resolve ahead of display names, per NIP-CM).
  2. Notify ladder: extend mobile/lib/features/channels/unread_badge/should_notify_for_event.dart with the NIP-CM escalation + mute-suppression rules (see desktop/src/features/notifications/lib/channelNotifyEscalation.ts and lib/feed.ts for the reference semantics, including the direct-mention-pierces-mute precedence).
  3. Compose: autocomplete rows + confirmation prompt, mirroring desktop ("Notify everyone in this channel" / online-only copy for @here), attaching the ["notify", mode] tag on send.
  4. Keep event kinds in sync: mobile/lib/shared/relay/nostr_models.dart mirrors desktop/src/shared/constants/kinds.ts.

Render + notify ladder (1+2) are the user-facing gap and can land before compose (3) β€” receiving correctly matters more than sending, and CLI/desktop already cover authoring.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions