Skip to content

Add a Discord/Slack webhook for tracked flights #2

Description

@vnmoorthy

When a user is tracking a flight (f) and it passes within 5 km of home, they currently get a browser notification. A Discord or Slack webhook would let the notification travel with the user to wherever they actually work.

Scope:

  • Add a webhookUrl field to Preferences in src/state/store.ts (persisted)
  • Settings drawer input for the webhook URL (with a test button)
  • Detect Discord (discord.com/api/webhooks/...) vs Slack (hooks.slack.com/services/...) from URL shape
  • Format the payload correctly for each (embeds for Discord, blocks for Slack)
  • Wire into App.tsx next to the existing fireNotification call in the tracked-flight callback
  • Rate-limit exactly the same as browser notifications (once per key per 5 min)

Test with: a real Discord webhook — create one in a test server, paste into settings, track a flight near your home.

Relevant files: src/lib/notify.ts, src/App.tsx, src/components/SettingsDrawer.tsx, src/state/store.ts.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions