Commit graph

10 commits

Author SHA1 Message Date
6ca17264e0 Let trusted apps add an embed and a link button to Discord direct messages
All checks were successful
Deploy Palico Bot / deploy (push) Successful in 7s
- POST /api/notifications/dm accepts optional embed (title, description, url, color, thumbnail, fields, footer, timestamp) and link fields; plain text stays required for phone notifications.
- Every value is checked against Discord's limits, and urls and thumbnails must use https; a refused embed answers 400 INVALID_EMBED.
- Sokko TCG uses it to show the destination, the result and the loot of its expedition alerts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 11:24:20 +01:00
2471b5f6f7 Explain missing channel access in /invitation; log DM requests
All checks were successful
Deploy Palico Bot / deploy (push) Successful in 6s
- /invitation checks the bot can view and post in the channel, and turns
  Discord's 50001/50013 into a clear reply instead of a generic error
- The DM route logs one line per request (user ID and status, never the text)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 11:22:10 +01:00
6895d20459 Fix deploy and lock down the DM route; add /invitation
All checks were successful
Deploy Palico Bot / deploy (push) Successful in 32s
- Deploy workflow: pin node:24-bookworm; install openssh-client only if missing
- Auth failure limiter counts only 401s (422/404 no longer lock out clients)
- trust proxy configurable (WEB_TRUSTED_PROXIES), never "true"
- DM route: loopback connections only, dedicated NOTIFICATIONS_API_KEY, 503 when unset
- Jukebox: no polling without a key, stop on 401
- /invitation: posts the temporary invite message after checking the link
- Stop tracking storage/library.json; README describes the real deployment

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 10:57:22 +01:00
3655b1ad74 Add an authenticated route that sends Discord direct messages for trusted apps
Some checks failed
Deploy Palico Bot / deploy (push) Failing after 3s
- POST /api/notifications/dm takes a user id and a text, sends it as a direct message with no active mentions, and answers 204, 400, 404 or 422.
- The send logic lives in src/features/directMessages.js with its own tests; the route gets its own per-minute rate limit behind the existing API key.
- Sokko TCG uses it for its opt-in Expedition alerts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 17:09:32 +01:00
20624a5c9c Harden bot, storage and web API 2026-06-30 17:25:00 +02:00
e974bc6660 fix sound streaming
All checks were successful
Deploy Palico Bot / deploy (push) Successful in 5s
2026-06-29 22:54:44 +02:00
ea73fc1f95 Replace native Opus codec with opusscript
Some checks failed
Deploy Palico Bot / deploy (push) Failing after 4s
2026-06-29 22:48:02 +02:00
ad2ff7b82e Add deploy workflow
All checks were successful
Deploy Palico Bot / deploy (push) Successful in 5s
2026-06-29 22:31:57 +02:00
8cba5a55b1 remove distinction between local and prod 2026-06-29 22:22:55 +02:00
6d2e379a0c Initial Commit 2026-06-28 22:44:04 +02:00