Commit graph

18 commits

Author SHA1 Message Date
64fbe737dc fix: escape tilde in rate-limit status to avoid MarkdownV2 strikethrough
~ is strikethrough in MarkdownV2, so "~5m 46s" breaks parsing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 10:40:02 +00:00
6bd531e5fc feat: show rate-limit countdown in /status
Track rate limit expiry from 429 responses. /status now displays
remaining time (e.g. "Rate-Limit (frei in ~7m 30s)") instead of
just "Rate-Limit (bitte warten)". Also skip unnecessary login
attempts while rate limit is known to be active.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 10:38:45 +00:00
86d3eeb51f fix: infer MIME type from file extension for Telegram downloads
Telegram's file API returns application/octet-stream instead of the
actual image type. Added inferMimeType() that detects the real type
from the URL extension (jpg→image/jpeg, png→image/png, etc.) when
the server response Content-Type is generic.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 10:36:09 +00:00
11e91a26c1 fix: status command shows detailed API health (rate-limit, auth, unreachable)
checkHealth() now returns 'ok' | 'rate_limited' | 'auth_error' | 'unreachable'
instead of boolean, so /status can display the specific issue with color-coded
indicators instead of just "Nicht erreichbar" for all failures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 10:29:57 +00:00
a2ee6d8cbe feat: comprehensive user-friendly German error messages
- Add centralized friendlyError() helper mapping technical errors to
  clear German messages (rate limit, auth, network, timeout, etc.)
- Improve /status to handle rate limits gracefully
- Improve album upload: abort early on rate limit/auth, show partial
  results with failure reason
- Better file-type rejection: show the rejected extension, suggest
  sending as photo instead
- Friendlier Telegram download errors (file too big, getFile failures)
- Add global bot.catch() handler for unhandled Grammy errors
- Truncate long unknown errors to 150 chars

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 10:26:56 +00:00
0d9d7a2971 fix: user-friendly error messages for rate limit and auth errors
Show German messages with retry time for 429 and helpful guidance for
401 instead of raw API error JSON.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 10:23:00 +00:00
f148856b1d fix: use _payload JSON field for Payload CMS upload
Payload CMS REST API requires document data (alt, tenant, etc.) as a
JSON string in a _payload form field, not as individual form fields.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 10:21:44 +00:00
7d78cbb208 fix: remove unnecessary backslash before em-dash in tenant list, verbose health check logging 2026-03-01 10:13:48 +00:00
dc2179a4d6 fix: hardcode tenant list as fallback (API returns 403), add verbose error logging 2026-03-01 10:11:13 +00:00
f93fe9a6a0 feat: add /anleitung command with tenant list, replace /start and /help with shared guide 2026-03-01 10:07:24 +00:00
132acf0ae7 feat: make tenant selection mandatory - no default tenant, user must choose via /tenant 2026-03-01 09:37:11 +00:00
22e9a59e2e docs: add README with setup and deployment instructions 2026-03-01 09:27:13 +00:00
412175030a feat: add entry point with graceful shutdown and PM2 config
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 09:26:20 +00:00
6a6710c666 feat: add command handlers, photo/document/album upload, tenant keyboard
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 09:24:35 +00:00
829d785c4a feat: add download helper and Payload API client with token caching
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 09:20:22 +00:00
a58d6f31fa feat: add auth middleware and bot setup with session and rate limiting
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 09:19:31 +00:00
e5dd5c6257 feat: add typed config validation and logger utility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 09:18:02 +00:00
eb05b40801 chore: project scaffold with deps and config 2026-03-01 09:17:07 +00:00