Wiki page changes trigger a email announcement to all users that didn't set a preference
|Reported by:||tfotherby||Owned by:||doki_pen|
I found that when a wiki page was changed, all trac users would be sent an announcement email about the change even if they didn't set anything in the "General Wiki Announcements" section of the preferences page. I would have expected only the users that were watching the page or have entered a wildcard (i.e. "*") should be sent a email?
For reference, I'm using trac 0.12 on centOS 5.5 and I installed trunk of Announcer on 27/Jul/10 via easy_install.
I was able to fix this issue by editing subscribers/wiki.py (sudo emacs /usr/lib/python2.4/site-packages/AnnouncerPlugin-0.12_p2.dev-py2.4.egg/announcer/subscribers/wiki.py)
def match(dist, value): for raw in value.split(' '): pat = urllib.unquote(raw).replace('*', '.*') if re.match(pat, event.target.name): return True
def match(dist, value): if value == '': return False for raw in value.split(' '): pat = urllib.unquote(raw).replace('*', '.*') if re.match(pat, event.target.name): return True