17 Commits

Author SHA1 Message Date
bvn13
51bd0b4b03 Add deduplication and auto-name for subscriptions
- Config: add_subscription returns None on duplicate (same src, filter, dst)
- Bot: resolve chat titles via get_entity, name rule as
  "src -> dst (filter_value)"; show duplicate message instead of adding

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 18:23:16 +03:00
bvn13
df2cab6b2b Fix forward: resolve entity before forwarding, catch PeerIdInvalidError
get_entity ensures Telethon has the peer cached before forwarding.
Wrap in try/except so a bad destination logs an error instead of
crashing the entire message handler.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 18:06:56 +03:00
bvn13
6c2c07430a Fix save on Docker bind-mount: write in-place instead of atomic rename
os.replace (rename) changes the inode which Docker bind-mounts prohibit
(EBUSY). Write directly to the file instead; a single-process writer
with RLock is safe without atomic rename.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 11:09:44 +03:00
bvn13
c53e58baf1 Add dynamic subscription management via Telegram commands
- Config: atomic JSON writes, stable rule ids + enabled flag with backfill,
  list/add/remove/set_enabled methods
- Bot: admin whitelist (TG_ADMIN_IDS), gate admin commands, new !sub
  list/add/del/on/off commands, skip disabled rules on forward
- main/compose: read TG_ADMIN_IDS from environment

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 14:30:18 +03:00
369086df76 Update src/main.py 2024-12-28 00:55:46 +03:00
bvn13
12fc75622e fixes 2024-11-12 02:05:13 +03:00
bvn13
7a8b201478 fix 2024-07-20 09:06:00 +03:00
bvn13
abedd82cf5 fix 2024-07-20 09:01:26 +03:00
bvn13
4f6762d49a fix 2024-07-20 08:57:22 +03:00
bvn13
6bcb13479e upd 2024-07-19 09:18:22 +03:00
bvn13
94113e3025 upd 2024-07-19 09:10:54 +03:00
bvn13
9a4be640d1 update timezone 2024-07-19 08:53:26 +03:00
bvn13
5ed0f9c4e7 upd time 2024-07-19 00:53:16 +03:00
bvn13
bcc43c3ff5 implemented weather job 2024-07-19 00:45:23 +03:00
bvn13
d2a5c97035 fixed bug with breaking of config reading 2024-07-11 22:38:30 +03:00
bvn13
b3aeae64e9 upd 2024-07-11 00:58:11 +03:00
bvn13
2ee1722836 squashed 2024-07-10 23:16:19 +03:00