generated from exteraGramPlugins/pluginBase
Message Logger: restore deep in long chats, media through the master, photo fixes
Publish plugin / publish (push) Successful in 4s
Publish plugin / publish (push) Successful in 4s
- Deleted messages within the loaded part of a long chat are placed by the app among the others (not only at the chat's end), without counting as unread; restores no longer repeat every second. - Logger copies and their media are read through a member of the log group signed in here (this account, else the master); the shared file cache lets the current account show them. - Logged chat photos: asked for once per 10 minutes, all sizes downloaded (no waits on inline thumbnails), added once the photo viewer closed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
362b358d8d
commit
dba0c4f833
7 files changed
+297
-78
No files matched your search
+12
@@ -99,6 +99,18 @@ class Api:
|
||||
out.append((token[:10], exc))
|
||||
return out
|
||||
|
||||
def masters(self):
|
||||
"""Telegram ids of the tokens' masters (from /me), cached 10 minutes."""
|
||||
cached = getattr(self, "_masters", None)
|
||||
if cached is not None and time.monotonic() - cached[0] < 600:
|
||||
return cached[1]
|
||||
found = []
|
||||
for _prefix, me in self.me():
|
||||
if isinstance(me, dict) and me.get("master_tg_id"):
|
||||
found.append(int(me["master_tg_id"]))
|
||||
self._masters = (time.monotonic(), found)
|
||||
return found
|
||||
|
||||
def sync(self, account_id, chat_id, min_id, max_id, present_ids):
|
||||
body = {
|
||||
"account_id": account_id,
|
||||
|
||||
Reference in new issue
Block a user