Message Logger: comments of deleted channel posts
Publish plugin / publish (push) Successful in 4s

The comments button of a deleted post opens the app's own comments section
(discussion thread), its history request answered locally from the logged
comments; the input bar is replaced by a "Viewing deleted comments" notice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
lyuksovannyyandClaude Opus 5.5 committed 2026-10-09 13:46:11 +02:00
1 parent 9b2f26a845
commit a2e4075a03
7 files changed
+499 -18

No files matched your search

+13
View File
@@ -54,6 +54,12 @@ class Api:
except requests.RequestException as exc:
raise ApiError(f"Server unreachable: {exc}") from exc
if response.status_code == 404:
try:
detail = response.json().get("detail")
except Exception:
detail = None
if detail == "Not Found": # the route itself: an older server
raise ApiError("the server doesn't support this yet (update telegram-panel)")
return None
if response.status_code >= 400:
try:
@@ -127,6 +133,13 @@ class Api:
params={"account_id": account_id},
)
def comments(self, account_id, chat_id, message_id):
return self._first(
"GET",
f"/messages/{chat_id}/{message_id}/comments",
params={"account_id": account_id},
)
def deletions(self, account_id, chat_id, message_ids):
ids = sorted(set(int(i) for i in message_ids))
marked = 0