brackt/app
Chris Parsons 79f7a41837
Add Discord webhook notifications for standings updates (#157)
* Add Discord webhook notifications for standings updates

Adds a Discord webhook integration that posts standings to a configured
Discord channel whenever scores change after a scoring event. Commissioners
set the webhook URL in league settings and can send a test notification.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix Discord notification edge cases from code review

- Fix point delta sign: negative diffs now correctly show -5 pts not +-5 pts
- Replace hardcoded soccer emoji with a neutral bullet (works for all sports)
- Truncate embed description at Discord's 4096-char limit
- Thread eventId through processMatchResult and bracket batch handler so
  scored matches appear in single-match notifications too
- Pass eventName to finalizeQualifyingPoints ("Final Standings") and
  processSeasonStandings ("Season Complete") so those notifications have context
- Test notification now fetches current season to show "League 2025" format

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix process-match-result tests: add sportsSeasons to db mock

recalculateAffectedLeagues now queries sportsSeasons to get the sport
name for Discord notifications; the test mock db needed the stub added.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 11:16:36 -07:00
..
components Partial bracket scoring, code review fixes, and double-chance logic (#156) 2026-03-17 10:50:30 -07:00
contexts feat: implement middleware and context provider for Express integration 2025-10-11 20:56:00 -07:00
hooks perf: fix draft room lag from excessive re-renders and listener leaks (#54) 2026-03-02 13:18:47 -08:00
lib Fix First Four appearing out of order in NCAA bracket display (#152) 2026-03-16 12:27:43 -07:00
models Add Discord webhook notifications for standings updates (#157) 2026-03-17 11:16:36 -07:00
routes Add Discord webhook notifications for standings updates (#157) 2026-03-17 11:16:36 -07:00
services Add Discord webhook notifications for standings updates (#157) 2026-03-17 11:16:36 -07:00
test feat: Add comprehensive scoring system database schema 2025-10-28 23:40:11 -07:00
types feat: add FIFA World Cup 48-team bracket template with group stage and projected scoring 2026-02-14 22:30:12 -08:00
utils Add Zod validation and expand export/import for EV and results data (#14) 2026-02-20 20:25:25 -08:00
welcome Redesign to dark-mode-only with navy palette and accent colors (#13) 2026-02-20 19:26:11 -08:00
app.css Add NProgress navigation progress bar (#139) 2026-03-11 22:02:48 -07:00
entry.client.tsx Filter unnecessary sentry css and js errors. 2026-03-15 10:24:57 -07:00
entry.server.tsx feat: add Sentry error monitoring (#132) 2026-03-10 23:35:33 -07:00
root.tsx Add NProgress navigation progress bar (#139) 2026-03-11 22:02:48 -07:00
routes.ts User/chris/ev f1 framework (#93) 2026-03-09 15:34:31 -07:00