diff --git a/deltabot.py b/deltabot.py index 23274c7..4ac2494 100644 --- a/deltabot.py +++ b/deltabot.py @@ -868,7 +868,6 @@ def monitor_worker(account): time.sleep(MONITOR_INTERVAL) monitors = load_monitors() changed = False - subscribers = load_subscribers() for m in monitors: ok, detail = check_url(m["url"]) was_ok = m.get("last_ok") @@ -878,7 +877,8 @@ def monitor_worker(account): alert = f"Сайт восстановлен\n{m['url']}" else: alert = f"САЙТ НЕДОСТУПЕН\n{m['url']}\nСтатус: {detail}" - for accid, chat_id in list(subscribers): + chat_id = m.get("added_chat") + if chat_id: try: account._rpc.send_msg(account.id, chat_id, {"text": alert}) except Exception as e: