feat: notify RD Gateway events in Telegram outside min_severity
Route rdg.connection.* through notify_rdg_connection and add disconnected type. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -428,8 +428,12 @@ def format_event_telegram_html(event: Event) -> str:
|
||||
|
||||
def _format_rdg_html(event: Event) -> str:
|
||||
details = _details_dict(event)
|
||||
ok = event.type.endswith(".success")
|
||||
header = "✅ RD Gateway: подключение" if ok else "❌ RD Gateway: ошибка"
|
||||
if event.type.endswith(".success"):
|
||||
header = "✅ RD Gateway: подключение"
|
||||
elif event.type.endswith(".disconnected"):
|
||||
header = "ℹ️ RD Gateway: отключение"
|
||||
else:
|
||||
header = "❌ RD Gateway: ошибка"
|
||||
msg = f"<b>{header}</b>\n"
|
||||
msg += _line("👤", "Пользователь", html_escape(_detail(details, "user", "username")))
|
||||
msg += _line("🏢", "Хост", host_label(event.host))
|
||||
|
||||
Reference in New Issue
Block a user