[Bug][iOS] 正则「整条隐藏」的消息仍产生未读红点/计数(应在收到时直接忽略)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start with ChatHistoryEntriesForView.swift, ChatListNodeEntries.swift, and ApplicationContext.swift, then review the linked history commit to trace how filtered messages affect unread counts and badges. Reproduce with only hidden messages and with a mix of hidden and visible unread messages. Done means hidden messages add no unread indicators while visible messages still count consistently across the chat list, folders, and app badge.
Written by the indexing model from the issue text.
Description
问题描述
在 Nagram iOS 中启用「正则消息过滤」,将匹配规则设为「整条隐藏」后,消息确实不会显示在聊天内容中,但这些本来就不想看的消息仍然产生未读提示,群聊在聊天列表里继续显示红色未读红点/计数。
这不只是“进入群聊后无法清除未读”的问题。更核心的问题是:既然用户主动设置规则来忽略某类消息,就不应为了清除这些消息的未读提示而被迫打开群聊,更不应该打开群聊后发现什么也看不到、还要手动标记已读。
本 Issue 所说的红点首先是 Nagram 聊天列表中群聊右侧的未读角标/数字,不是单指 iOS 主屏幕 App 图标的角标。
复现步骤
- 在 Nagram 设置 → 消息 → 正则消息过滤中启用过滤功能。
- 创建并启用一条匹配群聊消息的正则规则,处理方式选择「整条隐藏」。
- 在没有其他未读消息干扰的情况下,让该群聊收到一条命中规则的新消息。
- 观察:消息本身已被隐藏,但聊天列表仍出现未读红点/数字。
- 进入该群聊,看不到被隐藏的消息;返回列表后红点仍在。
- 只有长按该群聊并选择「标记为已读」,未读提示才会消失。
实际行为
- 匹配规则的消息被隐藏,不显示在聊天界面。
- 仅由被隐藏消息产生的未读提示依然存在,需要用户处理。
- 打开群聊也无法正常清除这部分提示,只能手动「标记为已读」。
预期行为(主要诉求)
「整条隐藏」应真正忽略匹配消息的未读提示,而不是仅仅隐藏消息气泡:
- 如果新收到的消息全部命中整条隐藏规则,该群聊从一开始就不应出现未读红点/数字,用户无需进入群聊、更无需手动标记已读。
- 如果聊天里同时有被隐藏消息和未被过滤的正常消息,未读计数及提醒应该只反映正常可见的未读消息;过滤规则不能吞掉真实需要阅读的内容。
- 聊天列表、文件夹未读数及客户端角标等与未读消息有关的显示应尽可能保持一致(不必通过进入聊天来触发修正)。
- 既有消息存储与 Telegram 的底层已读语义如何实现可由开发者选择;重点是过滤命中的消息不再制造需要用户处理的未读提示。
“进入群聊后能够清除红点”最多只是次要的兜底修复,不能替代以上行为。
环境
- 平台:iOS
- 客户端:Nagram iOS
- 版本:2026-10-19 时的最新 TestFlight 版本(具体 build number 未提供)
可能相关的代码(排查线索)
submodules/TelegramUI/Sources/ChatHistoryEntriesForView.swift:case .hidden: continue只影响聊天历史展示;源码注释说明不写回 Postbox。submodules/ChatListUI/Sources/Node/ChatListNodeEntries.swift:nagramShouldIgnoreRegexFilteredUnreadBadge根据当前已知的消息与未读总数来决定是否隐藏角标,可能遗漏一些情形。submodules/TelegramUI/Sources/ApplicationContext.swift:已有针对过滤消息扣减 App 角标的逻辑。- 相关历史提交:fix: apply message filters to notifications and badges。
以上仅为排查线索,并未确认最终根因。
- Dominant language
- Swift
- Stars
- 151
- Forks
- 22
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 3
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NextAlone/Nagram-iOS
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
NextAlone/Nagram-iOS#79 · 1 comment ·
-
置顶消息会显示已屏蔽消息问题Openbug
Difficulty 3/5 1-2 days Newbie friendliness 58/100
NextAlone/Nagram-iOS#77 · 1 comment ·
-
频道内容的评论区加载异常Openbug
Difficulty 3/5 1-2 days Newbie friendliness 48/100
NextAlone/Nagram-iOS#69 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
NextAlone/Nagram-iOS#65 · 1 comment · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
NextAlone/Nagram-iOS#63 ·
All issues in NextAlone/Nagram-iOS
Similar issues
-
[cloud_functions]: Apple platforms ignore custom domains passed as regionPossibly taken @ragavendranbala-TSL claimed this today. OpenNeeds Attention platform: ios platform: macos plugin: functions type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
firebase/flutterfire#19015 · 2 comments ·
Maintainers usually reply within 4 days
-
Difficulty 1/5 Under an hour Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
ecdye/macSubtitleOCR#98 ·
-
P3
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
macos-15
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
thaw-app/Thaw#1708 · 1 comment ·
Maintainers usually reply within 1 day