sandbox/ivideon/puml/Crowd/notifications/9205_pm_seq.puml

40 lines
1,009 B
Text
Raw 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.

@startuml PM Telegram Setup Sequence
actor "Dev" as DEV
actor "PM" as PM
participant "misc тачка" as MISC
participant "MongoDB\ncrowd.telegram_subscriptions" as DB
actor "User" as USER
participant "Telegram Bot" as BOT
participant "send_queue_overflow()" as NOTIF
PM -> USER: Коннектится с пользаком и\nсоздает с ним чат chat_id
PM -> BOT: Добавляют бота уведомлений в чат chat_id
PM -> DEV: Дает chat_id разрабам
DEV -> MISC: ssh
activate MISC
DEV -> DB: Создает запись
activate DB
note left of DB
{
"email": "demostandsalemsk@ivideon.com",
"chat_id": 89767978
}
end note
DB --> DEV: запись создана
deactivate MISC
deactivate DB
== Как все работает ==
NOTIF -> DB: найти chat_id по email
activate DB
DB --> NOTIF: chat_id: 89767978
NOTIF -> BOT: отправить уведомление в chat_id
BOT -> USER: уведомление в Telegram
deactivate DB
@enduml