Closed
Bug 629515
Opened 13 years ago
Closed 13 years ago
Notifications: De-duplicate across multiple events
Categories
(support.mozilla.org :: General, defect, P1)
support.mozilla.org
General
Tracking
(Not tracked)
VERIFIED
FIXED
2.5
People
(Reporter: erik, Unassigned)
Details
Brain dump of a possible "union" operator for firing multiple events together and de-duplicating the results: union(ThreadEvent(post), ForumEvent(post)).fire() # Fire the first arg, passing to it the union of .users_watching() on all args. Use this when the content of each arg's template is essentially the same, e.g. "This new post was made. Enjoy."—when the receipt of a mail from the 2nd template as well would add no value. (The fact that there's an unsubscribe link to only the first event's watch is acceptable. It's a convenience only, and they can always visit their user dashboard.) If the 2nd one would add value, you should probably fire both events independently and let both mails be delivered. {Or is fire_union(...) better?) (To implement, have union return an instance of a special class which has state which can hold the args, which can get pickled.)
Reporter | ||
Comment 1•13 years ago
|
||
This just got really nice to have, because we have to do it in the forums app when someone is watching both the Forum and a Thread within it.
Priority: P3 → P1
Reporter | ||
Comment 2•13 years ago
|
||
And when you finish this, replace the call to the set() constructor in the forum views with it.
Comment 3•13 years ago
|
||
Remember to un-skip the forums test for this, found in forums/tests/test_notifications.py:NotificationsTests.test_watch_both_then_new_post
Reporter | ||
Comment 4•13 years ago
|
||
Done in https://github.com/jsocol/kitsune/commit/3970e691cbaa90e3b1976e6e17137b58d7aa8935.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 5•13 years ago
|
||
I mean https://github.com/jsocol/kitsune/commit/6f765932c6e37f4d4b3c7f94be8b36a8682b2b76
Comment 6•13 years ago
|
||
Verified user signed up to watch both the forum and the thread only receives one notification for an update to either.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•