From 80a8725a034692694774943cdc8d86abb2a48209 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Sun, 20 Sep 2015 00:35:54 -0700 Subject: [PATCH] Remove certain hardcoded email addresses in Zephyr mirroring. (imported from commit 9fd492b5463f04741558687f27522d48a5dc795b) --- bots/zephyr_mirror_backend.py | 2 +- zerver/lib/actions.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bots/zephyr_mirror_backend.py b/bots/zephyr_mirror_backend.py index 98c1664634..77148d313c 100755 --- a/bots/zephyr_mirror_backend.py +++ b/bots/zephyr_mirror_backend.py @@ -370,7 +370,7 @@ def process_notice(notice, log): if is_personal: if body.startswith("CC:"): is_huddle = True - # Map "CC: sipbtest espuser" => "starnine@mit.edu,espuser@mit.edu" + # Map "CC: user1 user2" => "user1@mit.edu, user2@mit.edu" huddle_recipients = [to_zulip_username(x.strip()) for x in body.split("\n")[0][4:].split()] if notice.sender not in huddle_recipients: diff --git a/zerver/lib/actions.py b/zerver/lib/actions.py index c74f980a9a..01fce45ce9 100644 --- a/zerver/lib/actions.py +++ b/zerver/lib/actions.py @@ -352,7 +352,7 @@ def compute_jabber_user_fullname(email): def compute_mit_user_fullname(email): try: - # Input is either e.g. starnine@mit.edu or user|CROSSREALM.INVALID@mit.edu + # Input is either e.g. username@mit.edu or user|CROSSREALM.INVALID@mit.edu match_user = re.match(r'^([a-zA-Z0-9_.-]+)(\|.+)?@mit\.edu$', email.lower()) if match_user and match_user.group(2) is None: answer = DNS.dnslookup(