Skip to content

feat: nostr forward notifications#2415

Open
keshav0479 wants to merge 10 commits intoRoboSats:mainfrom
keshav0479:feat/nostr-forward-notifications
Open

feat: nostr forward notifications#2415
keshav0479 wants to merge 10 commits intoRoboSats:mainfrom
keshav0479:feat/nostr-forward-notifications

Conversation

@keshav0479
Copy link
Copy Markdown
Contributor

@keshav0479 keshav0479 commented Feb 5, 2026

What does this PR do?

Fixes #2190

This adds Nostr forwarding for robot trade notifications.

The idea is that a user can keep using separate robot identities, but still receive encrypted order updates on their main Nostr key through their own .onion relay.

What's included

  • New robot settings for forward pubkey, relay, and enabled state
  • RobotInfo UI to configure Nostr forwarding
  • Validation for hex / npub keys
  • Validation for ws:// or wss:// .onion relays
  • Test notification when forwarding is enabled or settings change
  • Tor proxy support when sending to onion relays
  • Android robot settings PUT fix
  • API tests around saving, validation, cleanup, and forwarding

Testing

I tested the onion relay path locally with strfry behind a temporary Tor hidden service.

That caught one issue where the SDK could not connect to the .onion relay unless the forwarding client used the existing Tor proxy config. After that change, strfry accepted the forwarded event.

Also ran:

  • manage.py test tests.test_api_robot_nostr_forward
  • targeted ruff checks
  • targeted frontend eslint checks
  • manage.py check
Screenshot From 2026-02-05 19-21-07 Screenshot From 2026-02-05 19-21-43

Checklist before merging

  • Install pre-commit and initialize it: pip install pre-commit, then pre-commit install. Pre-commit installs git hooks that automatically check the codebase. If pre-commit fails when you commit your changes, please fix the problems it points out.

@keshav0479
Copy link
Copy Markdown
Contributor Author

Updated this after spending some more time testing the actual forwarding path.

Fixed a few things that came up while checking it properly: Android settings updates were not sending PUT, relay/pubkey validation needed to be tighter, and onion relay sends now go through the existing Tor proxy config.

I also tested it locally with strfry behind a temporary Tor hidden service, without Tor proxying the SDK could not connect to the .onion relay, after change strfry accepted forwarded event.

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.

Forward Nostr Notification to main account

1 participant