mirror of https://github.com/zulip/zulip.git
zephyr_mirror: Fix bug computing recipients when sending huddles.
(imported from commit c6a7eadfa9cd007945d423e4e93f088857897e26)
This commit is contained in:
parent
2c294694fd
commit
8152619ce7
|
@ -93,8 +93,6 @@ def compute_humbug_username(zephyr_username):
|
|||
|
||||
def send_humbug(zeph):
|
||||
zeph["sender"] = compute_humbug_username(zeph["sender"])
|
||||
if "recipient" in zeph:
|
||||
zeph["recipient"] = compute_humbug_username(zeph["recipient"])
|
||||
zeph['fullname'] = username_to_fullname(zeph['sender'])
|
||||
zeph['shortname'] = zeph['sender'].split('@')[0]
|
||||
if "instance" in zeph:
|
||||
|
@ -176,7 +174,7 @@ def process_loop(log):
|
|||
if body.startswith("CC:"):
|
||||
is_huddle = True
|
||||
# Map "CC: sipbtest espuser" => "starnine@mit.edu,espuser@mit.edu"
|
||||
huddle_recipients_list = [x + "@mit.edu" for x in
|
||||
huddle_recipients_list = [compute_humbug_username(x.strip()) for x in
|
||||
body.split("\n")[0][4:].split()]
|
||||
if sender not in huddle_recipients_list:
|
||||
huddle_recipients_list.append(sender)
|
||||
|
@ -203,7 +201,7 @@ def process_loop(log):
|
|||
zeph = { 'type' : 'personal',
|
||||
'time' : str(notice.time),
|
||||
'sender' : sender,
|
||||
'recipient' : recipient,
|
||||
'recipient' : compute_humbug_username(recipient),
|
||||
'zsig' : zsig, # logged here but not used by app
|
||||
'content' : body }
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue