修复站长与文章作者评论通知耦合 - #30
Open
NHPT wants to merge 1 commit into
Open
Conversation
NHPT
force-pushed
the
fix/webmaster-notification
branch
from
August 16, 2026 17:45
052a91e to
767ae06
Compare
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.
问题
zznotice原先在通用resendMail()中按收件地址是否等于adminfrom决定是否发送。这会把邮箱地址误当成站长身份:当站长也是文章作者,或作者邮箱为空而回退到站长邮箱时,关闭站长通知会同时拦截作者通知。此外,待审核评论分支原先只通知站长。关闭站长通知后,文章作者在审核前不会收到任何提醒,而审核动作通常正是由文章作者完成。
adminfrom还始终带有required规则,导致关闭站长通知后仍无法留空保存。修改
waiting评论始终通知文章作者,zznotice只控制是否额外通知站长adminfrom,仍按作者身份正常接收adminfrom作为作者通知兜底adminfrom留空;启用时仍要求填写并校验格式验证