2026-09-07 19:43:48 +03:00

45 lines
1.4 KiB
Python
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.

"""
Модуль уведомлений для Communications приложения.
Публичный API:
- NotificationVerbs - константы глаголов уведомлений
- MessageTemplates - шаблоны сообщений
- ActionURLs - генераторы URL-адресов
- extract_mentions - извлечение упоминаний из текста
- truncate_message - обрезка текста сообщения
- get_chat_name - получение названия чата
- get_users_with_notifications_enabled - проверка настроек уведомлений
Использование:
from communications.notifications import extract_mentions, get_chat_name
# В коде:
mentions = extract_mentions(message.content)
chat_name = get_chat_name(chat)
"""
# Импортируем handlers и signals для регистрации
from . import (
handlers, # noqa: F401
signals, # noqa: F401
)
from .config import (
ActionURLs,
MessageTemplates,
NotificationVerbs,
extract_mentions,
get_chat_name,
truncate_message,
)
from .handlers import get_users_with_notifications_enabled
__all__ = [
"NotificationVerbs",
"MessageTemplates",
"ActionURLs",
"extract_mentions",
"truncate_message",
"get_chat_name",
"get_users_with_notifications_enabled",
]