diff options
| author | bwarsaw | 2002-04-11 18:16:07 +0000 |
|---|---|---|
| committer | bwarsaw | 2002-04-11 18:16:07 +0000 |
| commit | 6883a47f152f61b933237d47d72b6c8fe010c793 (patch) | |
| tree | d97fdfbab97af539be704bd344f0ed220b625714 /Mailman/Handlers/CalcRecips.py | |
| parent | 2421517a89d2426cedce23247b295197f7912da0 (diff) | |
| download | mailman-6883a47f152f61b933237d47d72b6c8fe010c793.tar.gz mailman-6883a47f152f61b933237d47d72b6c8fe010c793.tar.zst mailman-6883a47f152f61b933237d47d72b6c8fe010c793.zip | |
Diffstat (limited to 'Mailman/Handlers/CalcRecips.py')
| -rw-r--r-- | Mailman/Handlers/CalcRecips.py | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/Mailman/Handlers/CalcRecips.py b/Mailman/Handlers/CalcRecips.py index c28cea2c5..1b2a600be 100644 --- a/Mailman/Handlers/CalcRecips.py +++ b/Mailman/Handlers/CalcRecips.py @@ -93,23 +93,7 @@ delivery. The original message as received by Mailman is attached. def do_topic_filters(mlist, msg, msgdata, recips): hits = msgdata.get('topichits') zaprecips = [] - if not hits: - # The semantics for a message that did not hit any of the pre-canned - # topics is to troll through the membership list, looking for users - # who selected at least one topic of interest, but turned on - # ReceiveNonmatchingTopics. - for user in recips: - if not mlist.getMemberTopics(user): - # The user did not select any topics of interest, so he gets - # this message by default. - continue - if not mlist.getMemberOption(user, - mm_cfg.ReceiveNonmatchingTopics): - # The user has interest in some topics, but elects not to - # receive message that match no topics, so zap him. - zaprecips.append(user) - # Otherwise, the user wants non-matching messages. - else: + if hits: # The message hit some topics, so only deliver this message to those # who are interested in one of the hit topics. for user in recips: @@ -127,7 +111,22 @@ def do_topic_filters(mlist, msg, msgdata, recips): # The user was interested in topics, but not any of the ones # this message matched, so zap him. zaprecips.append(user) - + else: + # The semantics for a message that did not hit any of the pre-canned + # topics is to troll through the membership list, looking for users + # who selected at least one topic of interest, but turned on + # ReceiveNonmatchingTopics. + for user in recips: + if not mlist.getMemberTopics(user): + # The user did not select any topics of interest, so he gets + # this message by default. + continue + if not mlist.getMemberOption(user, + mm_cfg.ReceiveNonmatchingTopics): + # The user has interest in some topics, but elects not to + # receive message that match no topics, so zap him. + zaprecips.append(user) + # Otherwise, the user wants non-matching messages. # Prune out the non-receiving users for user in zaprecips: recips.remove(user) |
