Skip to content

Add a Discord/Slack webhook for tracked flights #2

@vnmoorthy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions