GramSieve

Telegram 本地增强 LSPosed 模块,提供消息过滤、宿主设置集成、浏览位置跳转、防撤回、防修改/编辑拦截、多版本编辑历史查看和原始媒体预览等能力。

An LSPosed module for local Telegram enhancements, including message filtering, host-settings integration, browsing position redirection, anti-recall, anti-edit/edit interception, multi-version edit-history viewing, and original media preview.

功能 Features

  • 仅本地过滤 — 所有过滤在设备上完成,无网络请求,数据不离开手机

  • 全局 + 单聊规则 — 全局设置宽泛规则,再针对特定聊天覆盖或排除

  • 丰富的匹配目标 — 消息文字、媒体说明、内联按钮文字/链接、发送者名称/ID、聊天名称/ID

  • 白名单优先 — 排除规则始终优先于过滤规则,适合管理员、公告或信任联系人

  • 三种过滤动作 — 本地隐藏、本地折叠、调试标记(测试用)

  • 宿主设置集成 — 在 Telegram 设置列表中提供 GramSieve 入口,配置页内嵌在宿主界面中,黑色背景并支持正常返回

  • 消息标记与跳转 — 单击消息可标记位置,从右上角菜单一键跳回,每个聊天独立标记

  • 浏览位置记忆 — 自动记录滚动位置,可一键跳转到上次浏览处

  • 下载页全选 — Telegram 下载管理页面多选模式下支持一键全选

  • 主动加载与防撤回防修改 — 后台和推送到达时主动加载消息,结合删除链路拦截和本地存储标记,尽量保留被撤回或修改的原始内容

  • 多版本编辑历史 — 编辑历史按版本保存,并会从 Telegram 本地历史同步写入中补齐离线期间发生的编辑

  • 编辑历史媒体查看 — 点击消息弹窗可查看编辑前内容,原始图片优先使用 Telegram 官方 PhotoViewer 并支持官方保存入口

  • 持久化诊断日志 — 运行日志写入 app-specific 外部目录,避免依赖容易溢出的 logcat 缓冲区

  • 模块冲突检测 — 识别常见 Telegram 增强模块;获得 root 授权后仅以只读方式核对 LSPosed 模块开关和 Telegram 作用域,再按防撤回、下载加速、Secret Media、去广告、Stories 和 UI 注入等重叠能力给出分级风险提示

  • 双语界面 — 英文和简体中文,支持跟随系统

  • Local-only filtering — all filtering happens on-device; no network requests, no data leaves your phone

  • Global + per-chat rules — set broad filters globally, then override or exclude specific chats

  • Rich match targets — message text, media captions, inline button labels/URLs, sender names/IDs, chat names/IDs

  • Whitelist wins first — exclusion rules always override filter rules; use them for admins, notices, or trusted contacts

  • Three filter actions — hide locally, collapse locally, or debug-mark (for testing)

  • Host settings integration — adds a GramSieve row to Telegram settings and opens the configuration page inside the host UI with a black background and normal back navigation

  • Mark & jump — tap a message to mark its position, jump back anytime from the menu; marks are per-chat

  • Browse position memory — automatically tracks scroll position, one-tap jump to last viewed message

  • Download page select all — select all loaded download items at once in Telegram's download manager

  • Anti-recall & anti-edit — proactively loads messages in the background and when push updates arrive, combining delete-path interception and local-storage marking to preserve recalled or edited content where possible

  • Multi-version edit history — stores edit history by version and recovers edits that arrive through Telegram local history-sync writes while the device was offline

  • Edit-history media viewer — open original pre-edit content from the message popup; original images prefer Telegram's official PhotoViewer and official save flow

  • Persistent diagnostics — runtime logs are written to app-specific external storage instead of relying on overflow-prone logcat buffers

  • Module conflict detection — detects common Telegram enhancement modules; after root authorization, it uses read-only LSPosed database queries to confirm module switches and Telegram scope before reporting potential overlap across anti-recall, download acceleration, Secret Media, ad blocking, Stories, and UI injection

  • Bilingual UI — English and Simplified Chinese, with system-follow option

规则写法 How Rules Work

GramSieve 会对消息文字、媒体说明、内联按钮文字/链接、发送者名称/ID、聊天名称/ID 进行标准化处理,然后逐行匹配规则。

GramSieve normalizes message text, media captions, inline button labels/URLs, sender names/IDs, and chat names/IDs, then matches rules line by line.

关键词规则 Keyword rules:

t.me/
buy now
sender:promo_bot
chat:airdrops
button:https://
caption:airdrop

正则规则 Regex rules:

https?://
sender:^(promo|deal)_bot$
button:https?://[^ ]+

支持的前缀 Supported prefixes:

前缀 Prefix 检查目标 Checks
text: 消息文字 Message text
caption: 媒体说明 Media captions
button: 按钮文字或链接 Button labels or URLs
sender: 发送者名称或 ID Sender name or ID
chat: 聊天名称或 ID Chat name or ID
(无/none) 以上所有字段 All fields above

在当前界面中,每个输入框已固定检查目标,通常不需要写前缀。

In the current UI, each input box is already target-specific, so prefixes are usually unnecessary.

入口 Entry Points

  • Telegram 设置列表GramSieve(宿主内嵌配置页)

  • 聊天右上角三点菜单聊天过滤规则 · 主动加载 · 跳转到上次浏览 · 跳转到标记位置

  • 单击某条消息屏蔽此消息 · 标记此消息 · 编辑历史

  • 下载页面多选模式全选 按钮(一键选中所有已加载的下载项)

  • Telegram settings listGramSieve (host-embedded configuration page)

  • Chat top-right overflow menuChat filters · Proactive loading · Jump to last viewed · Jump to marked position

  • Click a messageBlock this message · Mark this message · Edit history

  • Download page action modeSelect All button (select all loaded download items at once)

规则存储在模块应用内,通过 LSPosed service bridge 同步给 Telegram 读取。

Rules are stored in the module app and synced to the LSPosed service bridge so Telegram can read them.

持久化日志 Persistent Logs

调试防撤回、主动加载或媒体缓存时,优先读取持久化日志。公共 /sdcard/GramSieve 路径已放弃,日志写入 app-specific 外部目录:

When debugging anti-recall, proactive loading, or media caching, read persistent logs first. The public /sdcard/GramSieve path is no longer used; logs are written to app-specific external storage:

adb -s <device> shell tail -n 300 /sdcard/Android/data/org.telegram.messenger/files/GramSieve/gramsieve.log
adb -s <device> shell tail -n 300 /sdcard/Android/data/com.tianqianguai.gramsieve/files/GramSieve/gramsieve.log

开发与诊断 Development & Diagnostics

适配新 Telegram 版本前,可以先归档设备上的 Telegram APK 与反编译材料:

Before adapting to a new Telegram version, archive the device APK and reverse-engineering materials:

./scripts/archive-telegram-apk.ps1 -Device <device>

归档会写入 local/telegram-apk-archive/,该目录已加入 .gitignore,不会提交 APK 或 apktool 输出。

Archives are stored under local/telegram-apk-archive/, which is git-ignored so APKs and apktool output are not committed.

示例规则 Sample Rules

许可证 License

GramSieve 以 GNU General Public License v3.0 or later(GPL-3.0-or-later)发布。你可以复制、修改和分发本项目,但分发修改版或二进制版本时,需要遵守 GPL-3.0-or-later 的源码提供、许可证保留和同许可证分发要求。完整许可证文本见 LICENSE

GramSieve is released under the GNU General Public License v3.0 or later (GPL-3.0-or-later). You may copy, modify, and distribute this project, but modified versions and binary distributions must follow the GPL-3.0-or-later requirements for source availability, license preservation, and same-license distribution. See LICENSE for the full license text.

参考与致谢 Acknowledgements

GramSieve 的部分反撤回和编辑历史设计参考了 TeleVip-LSPosed 对 Telegram 本地消息存储、删除标记和编辑历史捕获路径的公开研究。GramSieve 没有引入 TeleVip-LSPosed 源码;相关功能基于 GramSieve 自身的 hook、缓存、数据库和 UI 结构独立实现。

Parts of GramSieve's anti-recall and edit-history design were informed by the public research in TeleVip-LSPosed around Telegram local message storage, deletion flags, and edit-history capture paths. GramSieve does not include TeleVip-LSPosed source code; the related functionality is implemented independently using GramSieve's own hooks, cache, database, and UI structure.

Releases

7/13/2026, 10:15:37 AM

更新日志

新增

  • 新增模块冲突检测,识别 Telegami、TeleVip、Re:Telegram、Killergram、Telegram Speed Hook 和 Telegram Tweaks/SideStories,并按防撤回、编辑历史、下载参数、Secret Media、保存限制、去广告、Stories、隐私与 UI 注入等重叠能力给出分级风险与避让建议。
  • 冲突检测在获得 root 授权后仅以只读方式查询 LSPosed 私有数据库,确认模块总开关和 Telegram 作用域;界面会显示各模块实际状态,查询失败时自动退回已安装包检测,且不会修改 LSPosed 数据库。
  • 新增主动加载与防撤回/防修改能力,可在模块全局设置中开启总开关。
  • Telegram 聊天右上角菜单新增按会话开启/关闭主动加载的入口,并直接显示当前状态。
  • 聊天右上角菜单新增“清理模式”,开启后 5 分钟内放行当前会话的批量删除操作,并可再次点击提前关闭。
  • 后台主动加载器会定期拉取已启用会话的最近消息,并在重启后自动恢复已启用的会话。
  • 收到 Telegram/MiPush 相关推送入口时会立即触发主动加载,减少进入聊天后才开始加载的延迟。
  • 新增媒体预取流程,主动调用 Telegram 文件加载路径并把可用的图片、视频等原始媒体复制到 GramSieve 缓存,降低打开编辑历史时转圈等待的概率。
  • 新增撤回/编辑检测,覆盖 Telegram 更新流、删除消息、编辑消息和已加载消息缓存路径。
  • 对方撤回产生的删除更新仍会在 Telegram 正式处理前清空待删除 ID,尽量阻止官方删除动作继续移除本地消息;用户主动删除则通过短时删除意图识别正常放行,并同步清理 GramSieve 中对应的消息、编辑历史和缓存媒体。
  • 用户确认删除整个对话后,GramSieve 会停止该会话的主动加载,清除模块侧消息、编辑历史和媒体缓存,并按 Telegram 账号隔离持久化本地隐藏状态;重启后的本地清理仅作用于经验证与该对话直接关联的 cache4 白名单表,避免已删对话被旧缓存重新带回列表。
  • 新增消息缓存体系:LRU 内存缓存 + SQLite 持久化,保存原始文本、媒体说明、发送者、媒体类型、媒体 ID、编辑/撤回状态和缓存媒体路径。
  • 新增媒体缓存,将原始图片、视频和其他可解析媒体复制到模块缓存中,供编辑历史和撤回后预览使用。
  • 消息绑定时会缓存普通文本、媒体说明、图片、视频、文档等内容,并用内容 + 媒体类型 + 媒体 ID 指纹区分真实编辑和非内容更新。
  • 点击消息弹窗中在“标记此消息”下方新增“编辑历史”入口;没有可展示编辑历史的消息不再显示该入口。
  • 编辑历史支持显示原始文本/媒体说明与编辑后内容。
  • 编辑前图片优先接入 Telegram 官方 PhotoViewer,保留顶部栏、右上角菜单和官方“保存到图库”入口。
  • 有 Telegram 原始媒体对象的历史图片/视频会优先尝试官方 PhotoViewer;缓存视频提供本地全屏播放器兜底。
  • 对仅有持久化缓存文件的原始图片构造隔离的临时 Telegram 图片消息,避免查看或保存后影响聊天中当前图片。
  • 原始媒体尚未缓存但仍有 Telegram 媒体对象时,会触发媒体预取并提示稍后重试;纯媒体历史缺失时会给出明确提示而不是打开空白页。
  • 被撤回消息会保留原内容提示,并尽量还原缓存媒体预览。
  • 运行日志现在写入 Telegram 进程 app-specific 外部目录,早期尚未拿到宿主 Context 的日志会先排队并在初始化后刷新进文件。
  • 模块进程收到 Provider 持久化日志时也会写入模块自身 app-specific 外部日志文件。
  • README 新增主动加载、防撤回、防修改、编辑历史媒体查看和持久化日志说明,并同步修正消息标记入口文案。
  • 配置入口现在寄生到 Telegram 设置列表中的 GramSieve 行,点击后在宿主设置页内打开模块配置。
  • 聊天页右上角配置入口优先打开宿主内嵌配置面板,不再直接跳出到模块 Activity。
  • 编辑历史改为多版本保存,新增 edit_history 持久化记录,连续编辑会保留多个版本。
  • MessagesStorage.putMessages 写入前会只读 Telegram 本地 messages_v2/messages_topics 旧消息,与新消息比较,补齐离线或历史同步期间发生的编辑。

修复与优化

  • 修复 Telegram 启动早期 ActivityThread.currentApplication 为空导致防撤回初始化失败的问题,改为在宿主或聊天 Context 可用时初始化。
  • 修复当前 Telegram 版本 loadMessages 反射签名不匹配导致主动加载失效的问题,改为按重载参数动态构造调用参数。
  • 修复 TL_updateEditChannelMessage / TL_updateEditMessage 字段识别问题,正确从 message 字段读取编辑后的消息。
  • 修复频道/群组删除更新中的 dialogId 解析,支持 channel_id + messages 的撤回更新。
  • 修复 Telegram 12.8.3 的 deleteMessages 同时携带 messageIdsrandomIds 时,把随机 ID 误当消息 ID 的问题;现在只解析第一个 Integer 消息 ID 列表。
  • 修复私聊 messagesDeleted 事件使用 dialogId=0 时,用户主动删除仍被防撤回拦截的问题;仅在全部消息 ID 唯一匹配同一条未过期删除意图时放行,歧义场景继续保守保护。
  • 修复删除操作仍处于 Undo 暂存阶段就提前清理缓存并隐藏对话的问题;本地清理现在只在实际删除提交边界触发。
  • 修复单独拉黑联系人被误判为删除对话并清空 GramSieve 历史的问题;blockPeer 不再触发对话清理。
  • 修复已开启主动加载的会话没有持久化、重启后不会自动加载的问题。
  • 修复本地隐藏状态仅按 dialogId 保存,导致多个 Telegram 账号中相同 peer 相互影响的问题;持久化键、旧键迁移、列表过滤和启动清理现在均按账号隔离。
  • 修复消息数据库读取 is_recalled / is_edited、媒体字段和缓存路径不完整的问题,并补齐游标关闭与线程安全处理。
  • 通过数据库迁移和 putFresh 逻辑重置旧的 isEdited / isRecalled 脏状态,避免普通消息被历史标记污染。
  • 修复反应、浏览量等非内容更新被误判为消息编辑的问题。
  • 修复普通消息误出现黄色或红色背景的问题,并移除编辑/撤回消息区域的强背景色显示。
  • 修复被复用的消息 Cell 残留撤回/编辑视觉状态,导致其他正常消息被污染的问题。
  • 修复没有编辑内容的消息仍显示“编辑历史”入口的问题。
  • 修复编辑前图片打开黑屏、被误判为视频、顶部栏缺失、右上角菜单不可用的问题。
  • 修复官方保存原始图片后返回聊天,当前图片区域变透明/空白的问题。
  • 修复部分编辑历史图片点击无反应时缺少可诊断日志的问题,现在会记录媒体类型、媒体 ID、缓存路径和 Telegram 媒体对象状态。
  • 修复 Telegram 菜单项 setText / setTextAndIcon 反射兼容性和点击处理,提升“主动加载”“编辑历史”“标记此消息”等菜单注入稳定性。
  • 提升防撤回、主动加载和媒体缓存相关日志可见性,并改为读取持久化文件而不是易溢出的 logcat 缓冲区。
  • 放弃公共 /sdcard/GramSieve 日志路径,避免 scoped-storage 权限导致文件不存在;诊断路径改为 app-specific 外部目录。
  • 修复 README 中消息标记入口描述,将长按更正为单击。
  • 回退未发布的系统 TranslationManager 翻译实验,本版不包含该隐藏 API 功能。
  • 移除了 Telegram 设置页右上角三点菜单里的“过滤规则”寄生入口,避免入口重复。
  • 宿主内嵌配置页改为固定全黑背景,并修复从该页返回时直接退出 Telegram 设置页或回到桌面的问题。
  • SQLite 持久化写入改为单线程序列化队列,降低 hook 流程阻塞 Telegram UI 的风险。
  • 收紧 Telegram cache4 本地清理白名单,排除并非 dialogId 归属的 download_queue.uidsaved_dialogs.didrequested_holes.uid,避免误删下载队列、Saved Messages 分组或秘密聊天重传状态。
  • 反撤回链路增强了对方撤回的本地删除拦截、NotificationCenter 删除通知拦截和 Telegram 本地消息 deleted flag 标记,减少图片/媒体消息在滑动重绑后被 Telegram 自身状态覆盖的问题;同时明确区分用户主动删除,确保对应的本地数据库、通知和 UI 更新能够正常放行。

工程、测试与发布

  • 新增 InstalledModuleScanner、LSPosedModuleStateReader、ModuleConflictDetector 及对应 JVM 测试,并补充 Android 包可见性声明与 app_process 保留规则。
  • 新增 AntiRecallConfigStore、BackgroundMessageLoader、MessageCache、MessageDatabaseHelper、MediaCache、MediaPrefetcher、RecallDetector 等防撤回核心模块,并增加 SelfDeleteTracker、LocalDialogDeleteStore、TelegramDialogDatabasePruner 和 TelegramDialogPrunePlan,承载用户主动删除识别、账号隔离隐藏和白名单本地清理。
  • 新增 AntiRecallConfigStoreTest、BackgroundMessageLoaderTest、MessageCacheTest、RecallDetectorTest、SelfDeleteTrackerTest、LocalDialogDeleteStoreTest、TelegramDialogPrunePlanTest 和 TelegramHookInstallerTest 等 JVM 测试,并补充删除拦截、真实编辑判断、多列表参数解析、私聊全局删除唯一匹配、账号键迁移、Undo 提交边界、blockPeer 隔离和 cache4 白名单回归覆盖。
  • 新增 AntiRecallIntegrationTest 仪器测试,覆盖防撤回集成路径。
  • 新增 Mockito 测试依赖,用于 SharedPreferences 等配置存储测试。
  • 新增防撤回方案与设计文档,记录主动加载、撤回/编辑检测、缓存和 UI 集成方案。
  • AGENTS.md 新增发布说明规范、持久化日志排查流程、Telegram Hook 生命周期和防撤回架构说明,并更新日志读取路径为 app-specific 外部目录。
  • CI 新增 GitHub Release 发布时自动构建并上传 APK 的 release-apk job。
  • 新增 SOURCE_URL 元数据文件。
  • 版本号更新为 versionName 0.1.3、versionCode 4,版本线保持 0.1.x。
  • 增加 Telegram APK 版本化归档脚本,便于复用反编译材料并避免 APK、apktool 输出进入仓库。
  • 补充宿主配置面板、序列化存储、多版本编辑历史和反撤回缓存相关测试。

Changelog

Compared with v0.1.1, this v0.1.3 release includes:

Added

  • Added module conflict detection for Telegami, TeleVip, Re:Telegram, Killergram, Telegram Speed Hook, and Telegram Tweaks/SideStories, with graded risks and avoidance guidance for overlapping anti-recall, edit-history, download, Secret Media, save-restriction, ad-blocking, Stories, privacy, and UI-injection capabilities.
  • After root authorization, conflict detection uses read-only queries against the private LSPosed database to confirm each module's master switch and Telegram scope; the UI shows the confirmed state, falls back to installed-package detection when the query fails, and never modifies the LSPosed database.
  • Added proactive loading with anti-recall and anti-edit support, controlled by a new global module setting.
  • Added a per-chat proactive loading toggle to Telegram's top-right chat menu, with the current state shown directly in the menu text.
  • Added Cleanup Mode to the top-right chat menu; while enabled, bulk deletion in the current chat is allowed for five minutes and can be turned off early with another tap.
  • Added a background loader that periodically loads recent messages for enabled chats and restores enabled chats after restart.
  • Telegram/MiPush-related push entry points now trigger an immediate proactive load, reducing the delay before messages are cached after push delivery.
  • Added media prefetching that asks Telegram's file-loading path for original images/videos and copies available files into GramSieve's cache, reducing spinner time when opening edit history.
  • Added recall/edit detection across Telegram update processing, delete calls, edit calls, and loaded-message caching paths.
  • Delete updates caused by remote recalls still clear message IDs before Telegram handles them, helping prevent official local deletion from removing preserved messages; user-initiated deletes are now recognized through short-lived deletion intents, allowed to proceed, and purge the corresponding GramSieve messages, edit history, and cached media.
  • After a full-dialog deletion is confirmed, GramSieve stops proactive loading for that chat, clears module-side messages, edit history, and media caches, and persists the local hide per Telegram account; restart cleanup is restricted to a verified cache4 allowlist of dialog-owned tables so stale local data does not bring the deleted dialog back into the list.
  • Added a message cache stack: LRU memory cache plus SQLite persistence for original text, captions, sender, media type, media ID, edit/recall flags, and cached media paths.
  • Added media caching for original images, videos, and other resolvable media so edit history and recalled-message previews can use preserved files.
  • Message binding now caches text, captions, photos, videos, documents, and media fingerprints based on content + media type + media ID.
  • Added an Edit History item below Mark this message in the message popup; messages without renderable edit history no longer show that item.
  • Edit history can show the original text/caption together with the edited content.
  • Original pre-edit images now prefer Telegram's official PhotoViewer, preserving the top bar, overflow menu, and official Save to Gallery entry.
  • Historical images/videos with an original Telegram media object try the official PhotoViewer first; cached videos keep a local full-screen player fallback.
  • Cached-only original images use an isolated temporary Telegram photo message, preventing the current chat image from being affected after viewing or saving.
  • If original media is not cached yet but a Telegram media object is still available, GramSieve triggers media prefetch and asks the user to retry shortly; missing media-only history now shows a clear message instead of opening a blank view.
  • Recalled messages retain an original-content hint and try to restore cached media previews.
  • Runtime logs now write to Telegram's app-specific external directory, and early logs emitted before host Context exists are queued and flushed once initialization completes.
  • Logs persisted through the module ContentProvider are also written to the module app's own app-specific external log file.
  • README now documents proactive loading, anti-recall, anti-edit, edit-history media viewing, and persistent log paths, and updates message-marking entry text.
  • The configuration entry is now injected into Telegram's settings list as a GramSieve row and opens inside the host settings page.
  • The chat menu configuration entry now prefers the host-embedded panel instead of launching the module Activity directly.
  • Edit history now stores multiple versions through the new edit_history persistence path.
  • MessagesStorage.putMessages now compares incoming messages with Telegram's existing messages_v2/messages_topics blobs to recover edits that happened during offline or history sync windows.

Fixed And Improved

  • Fixed anti-recall initialization failing when ActivityThread.currentApplication is unavailable early in Telegram startup by initializing once host or chat Context is available.
  • Fixed proactive loading failing on the current Telegram loadMessages signature by dynamically building arguments for compatible overloads.
  • Fixed TL_updateEditChannelMessage / TL_updateEditMessage handling by reading the edited message from the message field.
  • Fixed dialogId resolution for channel/group delete updates using channel_id + messages.
  • Fixed Telegram 12.8.3 deleteMessages parsing when messageIds and randomIds are supplied together; only the first Integer message-ID list is now treated as deletions.
  • Fixed user-initiated private-chat deletions still being blocked when messagesDeleted reports dialogId=0; deletion is allowed only when every ID uniquely matches one unexpired intent, while ambiguous cases remain protected.
  • Fixed GramSieve clearing caches and hiding a dialog while Telegram's delete action was still staged in UndoView; local cleanup now starts only at the committed deletion boundary.
  • Fixed standalone blockPeer calls being treated as dialog deletion and purging GramSieve history.
  • Fixed enabled proactive-loading chats not being persisted or restored after restart.
  • Fixed local hide state being keyed only by dialogId and leaking across Telegram accounts that share the same peer ID; persisted keys, legacy migration, row filtering, and startup cleanup are now account-scoped.
  • Fixed incomplete database reads for is_recalled / is_edited, media fields, and cached paths, and tightened cursor cleanup plus thread safety.
  • Reset stale isEdited / isRecalled state through database migration and putFresh logic so normal messages are not polluted by old flags.
  • Fixed reactions, view updates, and other non-content updates being treated as real message edits.
  • Fixed normal messages showing false yellow or red backgrounds, and removed strong background coloring from edited/recalled message areas.
  • Fixed reused message cells retaining stale recall/edit visual state and contaminating unrelated normal messages.
  • Fixed the Edit History item appearing on messages that have no edit content.
  • Fixed original images opening as a black screen, being misdetected as video, losing the top bar, or having an unusable overflow menu.
  • Fixed the current chat image turning transparent/blank after saving an original image through the official viewer.
  • Added diagnostic logs for edit-history media taps that cannot find a cached file, including media type, media ID, cached path, and Telegram media-object state.
  • Improved Telegram menu item reflection and click handling for Proactive Loading, Edit History, and Mark this message.
  • Improved anti-recall, proactive loading, and media-cache logging, with diagnostics based on persistent files instead of overflow-prone logcat buffers.
  • Dropped the public /sdcard/GramSieve log path to avoid scoped-storage failures; diagnostics now use app-specific external storage paths.
  • Fixed README wording for message marking from long-press to click.
  • Reverted the unreleased system TranslationManager experiment; this release does not include that hidden API feature.
  • Removed the duplicate “Filter rules” entry from Telegram settings' three-dot menu.
  • The host-embedded configuration page now uses a fixed black background and fixes back navigation so returning from GramSieve stays inside Telegram settings.
  • SQLite persistence now uses a single-thread serialized queue to reduce the risk of blocking Telegram UI hooks.
  • Restricted Telegram cache4 cleanup to verified dialog-owned tables, excluding download_queue.uid, saved_dialogs.did, and requested_holes.uid so unrelated downloads, Saved Messages grouping, and secret-chat retry state are preserved.
  • Anti-recall handling now strengthens local interception of remote recalls, NotificationCenter deletion interception, and Telegram local deleted-flag marking to reduce media messages disappearing after rebinding or scrolling; user-initiated deletion is now handled separately so the corresponding database, notification, and UI updates can proceed normally.

Engineering, Tests, And Release

  • Added InstalledModuleScanner, LSPosedModuleStateReader, ModuleConflictDetector, their JVM tests, Android package-visibility declarations, and the app_process keep rule.
  • Added the anti-recall core modules: AntiRecallConfigStore, BackgroundMessageLoader, MessageCache, MessageDatabaseHelper, MediaCache, MediaPrefetcher, and RecallDetector, plus SelfDeleteTracker, LocalDialogDeleteStore, TelegramDialogDatabasePruner, and TelegramDialogPrunePlan for user-deletion intent tracking, per-account local hiding, and allowlisted local cleanup.
  • Added JVM tests for AntiRecallConfigStore, BackgroundMessageLoader, MessageCache, RecallDetector, SelfDeleteTracker, LocalDialogDeleteStore, TelegramDialogPrunePlan, and TelegramHookInstaller, with regression coverage for delete interception, real-edit detection, multi-list parameter parsing, unique matching for private-chat global deletion events, account-key migration, Undo commit boundaries, blockPeer isolation, and cache4 allowlisting.
  • Added AntiRecallIntegrationTest for the instrumented anti-recall integration path.
  • Added Mockito for SharedPreferences and configuration-store tests.
  • Added anti-recall planning and design documentation for proactive loading, recall/edit detection, caching, and UI integration.
  • Updated AGENTS.md with release-note rules, persistent-log diagnostics, Telegram hook lifecycle notes, anti-recall architecture notes, and app-specific log paths.
  • Added a GitHub Release release-apk workflow job to build and upload an APK when a release is published.
  • Added SOURCE_URL metadata.
  • Updated the app to versionName 0.1.3 and versionCode 4, keeping the 0.1.x release line.
  • Added a versioned Telegram APK archive script so reverse-engineering evidence can be reused without committing APK or apktool output.
  • Added and updated tests for the host config panel, serialized storage, multi-version edit history, and anti-recall cache behavior.

Assets

1