From 8a76560970c40be4740652d09d2124eb0070331d Mon Sep 17 00:00:00 2001 From: Zev Benjamin Date: Wed, 7 Nov 2012 11:53:58 -0500 Subject: [PATCH] Use a JSON array for recipients in send_message (imported from commit e2184f92b708cc2e8ef3e9ae79ee4241c0aa12a1) --- bots/zephyr_mirror.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bots/zephyr_mirror.py b/bots/zephyr_mirror.py index ab01bfd..6a3c37c 100755 --- a/bots/zephyr_mirror.py +++ b/bots/zephyr_mirror.py @@ -227,11 +227,10 @@ def process_notice(notice, log): if body.startswith("CC:"): is_huddle = True # Map "CC: sipbtest espuser" => "starnine@mit.edu,espuser@mit.edu" - huddle_recipients_list = [to_humbug_username(x.strip()) for x in - body.split("\n")[0][4:].split()] - if notice.sender not in huddle_recipients_list: - huddle_recipients_list.append(to_humbug_username(notice.sender)) - huddle_recipients = ",".join(huddle_recipients_list) + huddle_recipients = [to_humbug_username(x.strip()) for x in + body.split("\n")[0][4:].split()] + if notice.sender not in huddle_recipients: + huddle_recipients.append(to_humbug_username(notice.sender)) body = body.split("\n", 1)[1] if (zephyr_class == "mail" and notice.instance.lower() == "inbox"): is_personal = True