mirror of https://github.com/zulip/zulip.git
zephyr_mirror: Rename humbug_username to to_humbug_username.
(imported from commit 764673b9ccf2f58f88e1d6eec173a1c49ac15cad)
This commit is contained in:
parent
63a015f67d
commit
e5df7b289c
|
@ -78,7 +78,7 @@ humbug_client = api.common.HumbugAPI(email=options.user + "@mit.edu",
|
|||
|
||||
start_time = time.time()
|
||||
|
||||
def humbug_username(zephyr_username):
|
||||
def to_humbug_username(zephyr_username):
|
||||
return zephyr_username.lower().split("@")[0] + "@mit.edu"
|
||||
|
||||
def unwrap_lines(body):
|
||||
|
@ -89,7 +89,7 @@ def unwrap_lines(body):
|
|||
def send_humbug(zeph):
|
||||
if options.forward_class_messages:
|
||||
zeph["forged"] = "yes"
|
||||
zeph["sender"] = humbug_username(zeph["sender"])
|
||||
zeph["sender"] = to_humbug_username(zeph["sender"])
|
||||
zeph['fullname'] = username_to_fullname(zeph['sender'])
|
||||
zeph['shortname'] = zeph['sender'].split('@')[0]
|
||||
if "subject" in zeph:
|
||||
|
@ -234,7 +234,7 @@ 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 = [humbug_username(x.strip()) for x in
|
||||
huddle_recipients_list = [to_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)
|
||||
|
@ -260,7 +260,7 @@ def process_notice(notice, log):
|
|||
zeph = { 'type' : 'personal',
|
||||
'time' : str(notice.time),
|
||||
'sender' : sender,
|
||||
'recipient' : humbug_username(recipient),
|
||||
'recipient' : to_humbug_username(recipient),
|
||||
'zsig' : zsig, # logged here but not used by app
|
||||
'content' : body }
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue