Corp/backend/notifications
Игорь Надеин 6860bdba15
All checks were successful
Deploy production / deploy (push) Successful in 12m7s
Track unread subscription notifications separately
2026-11-03 12:28:53 +03:00
..
2026-09-07 19:43:48 +03:00
2026-09-07 19:43:48 +03:00
2026-09-07 19:43:48 +03:00
2026-09-07 19:43:48 +03:00
2026-09-07 19:43:48 +03:00
2026-09-07 19:43:48 +03:00

Notifications module

Verb-based notifications с REST API, WebSocket, email, Web Push, user preferences, per-chat режимами и синхронизацией жизненного цикла системных уведомлений между устройствами.

Канонический guide: ../../docs/guides/NOTIFICATIONS.md.

Публичная точка входа

from notifications.signals import notify

notify.send(
    sender=actor,
    recipient=user,
    verb="domain_event",
    description="Описание",
    action_url="/target",
    data={"title": "Заголовок"},
)

NotificationService удалён из рабочего API и оставлен только как deprecated stub. Не вызывайте sender или Celery task напрямую из доменного кода: это обходит preferences, DND и transaction.on_commit.

cd backend
pytest tests/api/v1/notifications tests/api/v1/communications tests/realtime -q