Use a JSON array for recipients in send_message

(imported from commit e2184f92b708cc2e8ef3e9ae79ee4241c0aa12a1)
This commit is contained in:
Zev Benjamin 2012-11-07 11:53:58 -05:00
parent 4c2d56c10b
commit 8a76560970

View file

@ -227,11 +227,10 @@ def process_notice(notice, log):
if body.startswith("CC:"): if body.startswith("CC:"):
is_huddle = True is_huddle = True
# Map "CC: sipbtest espuser" => "starnine@mit.edu,espuser@mit.edu" # Map "CC: sipbtest espuser" => "starnine@mit.edu,espuser@mit.edu"
huddle_recipients_list = [to_humbug_username(x.strip()) for x in huddle_recipients = [to_humbug_username(x.strip()) for x in
body.split("\n")[0][4:].split()] body.split("\n")[0][4:].split()]
if notice.sender not in huddle_recipients_list: if notice.sender not in huddle_recipients:
huddle_recipients_list.append(to_humbug_username(notice.sender)) huddle_recipients.append(to_humbug_username(notice.sender))
huddle_recipients = ",".join(huddle_recipients_list)
body = body.split("\n", 1)[1] body = body.split("\n", 1)[1]
if (zephyr_class == "mail" and notice.instance.lower() == "inbox"): if (zephyr_class == "mail" and notice.instance.lower() == "inbox"):
is_personal = True is_personal = True