fix: 适配飞书 7.73.9 的已读上报入口 - #10
Merged
Merged
Conversation
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
#9 合入后,我在 2026-08-11 使用 macOS 飞书 7.53.16 完成了双账号手工验证。2026-08-12 升级到 7.73.9 后,我重新分析了新版客户端的真实
messenger.asar:updateMessagesMeRead已读上报入口由 1 处变为 2 处,两个入口的请求对象变量分别为_和t。现有补丁会匹配所有入口,但注入的代码把请求对象固定写成了
t,因此无法可靠处理变量为_的入口。本 PR 改为从每个锚点捕获实际变量名,再为当前入口生成补丁。修改内容
read-receipt-gate的匹配规则,同时捕获当前入口的已读请求对象变量。r处理对应的请求对象,不再依赖固定变量名。_与t两种变量同时出现时的回归测试。兼容性与验证
python3 -m unittest discover -s tests -v:9/9 通过python3 -m py_compile main.py asar.py tests/test_patch.py tests/test_asar.pygit diff --checknode --checknode --check两次手工验证的结果一致:只打开会话时,对方仍看到未读;成功发送消息后,当前会话恢复合理的已读状态;之后收到的新消息仍保持未读。账号侧验证均由人工完成,没有通过自动化工具操作或发送飞书消息。
本 PR 不改变 #9 的已读控制策略,只补充新版入口的动态变量适配。按当前测试结果,代码兼容 macOS 飞书 7.53.16 和 7.73.9。