28 lines
1.0 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Notifications module
Verb-based notifications с REST API, WebSocket, email, Web Push, user preferences, per-chat режимами и синхронизацией жизненного цикла системных уведомлений между устройствами.
Канонический guide: [`../../docs/guides/NOTIFICATIONS.md`](../../docs/guides/NOTIFICATIONS.md).
## Публичная точка входа
```python
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`.
```bash
cd backend
pytest tests/api/v1/notifications tests/api/v1/communications tests/realtime -q
```