fix(B27): gate warn notify on real Telegram delivery (V66a) + scan config.env bind

VOTE ULANG SEGERA never reached community channel though dashboard badge showed:
- scan service lacked NFS config.env bind -> empty TELEGRAM_* -> send_text silent no-op
- _notify_warn still record_notify'd -> fake dedup rows blocked future sends

send_text/notify_warn now return delivery bool; record_notify only on True.
scan service mounts config.env:/app/.env:ro.
This commit is contained in:
proitlab committed 2026-09-02 12:39:24 +07:00
1 parent 8ad7df00f0
commit c262b4677c
6 files changed
+48 -20

No files matched your search

+1 -2
View File
@@ -210,8 +210,7 @@ def _notify_warn(now):
if prev is not None and prev >= urgency:
continue
to_notify.append((owner, f'{staked:,.4f}', urgency))
if to_notify:
telegram.notify_warn(to_notify)
if to_notify and telegram.notify_warn(to_notify):
for owner, _, urgency in to_notify:
db.record_notify(owner, urgency,
now.isoformat(timespec='seconds'))