Message Logger: hidden messages on the server, removed chats, old chat photos
Publish plugin / publish (push) Successful in 6s

- Hidden deleted messages are marked on the server (local marks migrated);
  "Reveal hidden messages" in the chat menu, Unhide in the message menu and
  the selection bar.
- Chats an account lost are reported, listed among its chats again and
  opened read-only with their logged messages, all deleted.
- Logged chat photos: a removed chat's avatar, and in a chat's photos the
  ones it no longer has, translucent with a trash icon in the viewer's
  previews.
- Fix: the deleted-post comments thread is answered locally again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
lyuksovannyyandClaude Opus 5.5 committed 2026-10-10 23:12:33 +02:00
1 parent 0176f7099d
commit 362b358d8d
15 files changed
+1821 -125

No files matched your search

+19 -1
View File
@@ -314,7 +314,7 @@ def main(argv=None) -> int:
store.put_server_states(0, -7, [{"message_id": 1, "edit_count": 1}])
store.put_server_states(0, -8, [{"message_id": 1, "edit_count": 1}])
store.mark_deleted(0, -7, [2])
store.hide(0, -7, [3])
store.set_hidden(0, -7, [3])
check(
"reset forgets one chat's marks, keeps others and hidden ones",
store.reset(0, -7) == 2
@@ -322,6 +322,24 @@ def main(argv=None) -> int:
and store.get(0, -8, 1) is not None
and store.is_hidden(0, -7, 3),
)
store.put_server_states(
0, -9, [{"message_id": 4, "deleted_at": "x", "logged": {"chat_id": 1}}]
)
shown = len(store.cached_deleted(0, -9, 1, 10)) == 1
store.set_hidden(0, -9, [4])
waiting = store.pending_hidden().get((0, -9, True))
skipped = store.cached_deleted(0, -9, 1, 10) == []
store.hidden_sent(0, -9, [4], True)
check(
"hidden marks wait for the server, then are its state",
shown
and waiting == [4]
and skipped
and (0, -9, True) not in store.pending_hidden()
and store.is_hidden(0, -9, 4)
and len(store.cached_deleted(0, -9, 1, 10, True)) == 1,
f"waiting={waiting} skipped={skipped}",
)
for name in ("cached_deleted", "coverage", "set_coverage", "expire_coverage", "replace_window"):
check(f"store.{name} exists", callable(getattr(store, name, None)))