完善消息去重并增加说明文档 - #580
Merged
CJKmkp merged 4 commits intoJul 27, 2026
Merged
Conversation
🤖 Augment PR SummarySummary: This PR improves the in-app notification deduplication logic to better suppress rapid-fire repeated messages in classroom scenarios. Changes:
🤖 Was this summary useful? React with 👍 or 👎 |
| ///</summary> | ||
| if (string.IsNullOrEmpty(_lastMessage.Title) || string.IsNullOrEmpty(message.Title)) return false; | ||
|
|
||
| TimeSpan interval = message.CreatedAt - _lastMessage.Time; |
There was a problem hiding this comment.
| ///<summary> | ||
| ///在一定时间内和前条标题相同,内容相同,来源相同的消息返回true | ||
| ///</summary> | ||
| if (string.IsNullOrEmpty(_lastMessage.Title) || string.IsNullOrEmpty(message.Title)) return false; |
There was a problem hiding this comment.
Member
|
喵喵 |
Contributor
Author
等我下个星期有空就改,喵) |
Member
|
好的 |
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.
功能描述
消息去重机制当遇到多个
_deduplicationWindowSeconds秒(目前为2秒)之内的重复消息会进行拦截使重复消息只显示一次需求动机
当异常代码引起的死循环弹消息发生时能有效拦截避免干扰课堂