feat(blacklist): show the changed list after every add and remove

/blacklist_add, /blacklist_del, /whitelist_add and /whitelist_del now answer
with the current contents of the list they touched, so the sender sees the
result without following up with /blacklist_rules.

All four outcomes end the same way, including the two that change nothing:
text already present, and text that was not there to remove. Those are
exactly when someone wants to see what the list holds, and "every add and
remove shows the list" is a simpler rule than one conditional on whether a
write landed.

The confirmation line shares the listing's byte budget, so a long list
cannot push the combined reply past Telegram's message limit.
This commit is contained in:
tiennm99 committed 2026-09-15 13:48:34 +07:00
1 parent e5125fcd93
commit c47bcf2c7f
4 files changed
+180 -5

No files matched your search

+7
View File
@@ -77,6 +77,13 @@ Matching is by substring, after the text is normalized:
## Listing
Every `/blacklist_add`, `/blacklist_del`, `/whitelist_add` and `/whitelist_del` answers with
the current contents of the list it touched, so you see the result without running anything
else. That includes the two outcomes that change nothing — text already present, or text that
was not there to remove — since those are exactly the moments you want to see what the list
actually holds. A whitelist command shows the whitelist; a blacklist command shows the
blacklist.
`/blacklist_rules` prints both lists in one message, each with its entry count,
showing entries as they were typed rather than in the normalized form. Each
entry is tappable to copy, ready to paste into a `_del` command.