Files
messageLogger/src/config.py
T
lyuksovannyyandClaude Opus 5.5 362b358d8d
Publish plugin / publish (push) Successful in 6s
Message Logger: hidden messages on the server, removed chats, old chat photos
- 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>
2026-10-10 23:12:33 +02:00

39 lines
1.1 KiB
Python

"""Setting keys and defaults."""
SERVER_URL = "server_url"
API_TOKEN = "api_token"
KEEP_DELETED = "keep_deleted"
RESTORE_MISSING = "restore_missing"
REPORT_DELETIONS = "report_deletions"
DELETED_ALPHA = "deleted_alpha"
CACHE_DAYS = "cache_days"
SHOW_REMOVED_CHATS = "show_removed_chats"
DEFAULTS = {
SERVER_URL: "",
API_TOKEN: "",
KEEP_DELETED: True,
RESTORE_MISSING: True,
REPORT_DELETIONS: True,
DELETED_ALPHA: 0, # index into ALPHA_CHOICES
CACHE_DAYS: 2, # index into CACHE_DAYS_CHOICES
SHOW_REMOVED_CHATS: True,
}
# Opacity of deleted messages: well visible, marked by the trash icon.
ALPHA_CHOICES = [("75%", 0.75), ("90%", 0.9), ("50%", 0.5)]
# A chat's checked range of message ids stays valid this long: within it the
# server is asked again only after an edit/delete event in the chat.
COVERAGE_SECONDS = 3600
# Cached server answers older than this are removed (checked once a day).
CACHE_DAYS_CHOICES = [
("1 day", 1),
("7 days", 7),
("30 days", 30),
("90 days", 90),
("365 days", 365),
("Never", None),
]
HTTP_TIMEOUT_SECONDS = 15