fix: send referral notifications to direct bill/member followers
The dispatcher was suppressing all referral-tier events (committee referrals) for neutral-mode users, regardless of whether they directly followed a bill or just followed a topic. This meant directly-followed bills like HR 7711 and S 3853 showed ✓ in Recent Alerts but no ntfy notification was ever fired. Now only topic-follow referral events are suppressed for neutral users (topic follows are loose and noisy). Direct bill follows and member follows always receive referral events. Authored-By: Jack Levy
This commit is contained in:
@@ -110,9 +110,12 @@ def dispatch_notifications(self):
|
||||
db.commit()
|
||||
continue
|
||||
|
||||
# Referral-tier events (committee referrals) are noisy for neutral follows;
|
||||
# pocket_veto and pocket_boost users want them as early warnings
|
||||
if follow_mode == "neutral" and (event.payload or {}).get("milestone_tier") == "referral":
|
||||
# Referral-tier events (committee referrals) are noisy for loose topic follows;
|
||||
# suppress them only for topic-follow events so direct bill/member followers
|
||||
# still get notified when their bill is referred to committee.
|
||||
payload = event.payload or {}
|
||||
is_topic_follow = payload.get("source") == "topic_follow"
|
||||
if follow_mode == "neutral" and payload.get("milestone_tier") == "referral" and is_topic_follow:
|
||||
event.dispatched_at = now
|
||||
db.commit()
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user