nordabiz/blueprints/messages
Maciej Pienczyn dcbf8b5db6
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
feat(email): one-click unsubscribe w mailach powiadomień (RFC 8058)
Każdy e-mail powiadomieniowy ma teraz:
(1) link w stopce "Wyłącz ten typ powiadomień jednym kliknięciem"
(2) nagłówki List-Unsubscribe + List-Unsubscribe-Post dla klientów
    pocztowych (Gmail/Apple Mail pokażą natywny przycisk Unsubscribe)

Implementacja:
- utils/unsubscribe_tokens.py: signed token (itsdangerous, SECRET_KEY)
  niosący user_id + notification_type, bez wygasania
- blueprints/unsubscribe: GET /unsubscribe?t=TOKEN → strona potwierdzenia,
  POST /unsubscribe → faktyczne wyłączenie flagi notify_email_<type>
- email_service.send_email() dostał parametr notification_type. Jeśli
  przekazany razem z user_id, footer + headery są doklejane
- Aktualizowane wywołania: message_notification (messages),
  classified_question/answer (B2B Q&A), classified_expiry (skrypt cron)

Prefetch safety: GET pokazuje stronę z przyciskiem "Tak, wyłącz",
wyłączenie następuje po POST. RFC 8058 One-Click (POST bez formularza
z Content-Type application/x-www-form-urlencoded + body
"List-Unsubscribe=One-Click") obsługuje klientów pocztowych.

D.2/D.3 dorzucą kolejne notification_type (forum, broadcast, events).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 17:56:36 +02:00
..
__init__.py feat(messages): add reactions and pins API 2026-03-27 13:09:36 +01:00
CLAUDE.md claude-mem plugin v10.3.3 2026-02-23 10:33:26 +01:00
conversation_routes.py improve(messages): add group roles (admin/member) with role management UI 2026-04-08 16:42:17 +02:00
group_routes.py feat(messages): delete group and delete individual messages 2026-03-20 12:26:50 +01:00
link_preview.py feat(messages): add link preview for URLs in messages 2026-03-27 13:10:34 +01:00
message_routes.py feat(email): one-click unsubscribe w mailach powiadomień (RFC 8058) 2026-04-14 17:56:36 +02:00
reaction_routes.py feat(messages): add reactions and pins API 2026-03-27 13:09:36 +01:00
routes.py fix: unread badge counts only new conversation system, removes legacy PM/group counting 2026-04-10 16:28:50 +02:00
sse_routes.py feat(messages): add SSE stream, typing indicator, and presence endpoints 2026-03-27 13:01:37 +01:00