Opened 8 years ago
Last modified 8 years ago
#13117 new enhancement
Use INotificationSubscriber rather than EmailDistributor disabled
Reported by: | Jun Omae | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | QuietPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 1.2 |
Description
QuietPlugin requires EmailDistributor
disabled and QuietEmailDistributor
enabled. However, I don't think that is good to implement quiet-mode.
Instead, we could implement subscriber which returns -1 as priority and 'never'
as adverb for users in quiet mode.
Attachments (1)
Change History (5)
comment:1 Changed 8 years ago by
Changed 8 years ago by
Attachment: | quiet-subscriber.diff added |
---|
comment:2 follow-up: 3 Changed 8 years ago by
I thought that is an easy task but actually not. Proposed changes is incomplete. If email address is set to Cc field and smtp_always_{cc,bcc}
options, the notifications couldn't be blocked.
It is caused by NotificationSystem.subscriptions()
determines always
for email addresses at source:/tags/trac-1.2/trac/notification/api.py@:412-414#L382.
BTW, I noticed 2 issues while implementing it.
_is_quiet_mode()
should checksession_attribute.authenticated=1
.- If
QUIET_MODE
is revoked from a user after setting quiet-mode, changes from the user are still quiet.
comment:3 Changed 8 years ago by
Replying to Jun Omae:
BTW, I noticed 2 issues while implementing it.
_is_quiet_mode()
should checksession_attribute.authenticated=1
.- If
QUIET_MODE
is revoked from a user after setting quiet-mode, changes from the user are still quiet.
Thanks, I'll commit those changes.
I had wondered if there might be a better way (comment:9:ticket:13045). Feel free to commit a patch. I gave you owner permissions on PyPI so you can publish an updated package.
TODO Revise QuietPlugin#Installation if patch is committed.