zephyr_mirror: Hack to let golem receive mirrored personals

(imported from commit 68539e45dbdfd70a037405dd2760474bf46dff76)
This commit is contained in:
Zev Benjamin 2013-10-11 16:06:50 -04:00
parent 989ea5ffbc
commit 134e96ad9b

View file

@ -82,6 +82,9 @@ def to_zulip_username(zephyr_username):
else:
(user, realm) = (zephyr_username, "ATHENA.MIT.EDU")
if realm.upper() == "ATHENA.MIT.EDU":
# Hack to make ctl's fake username setup work :)
if user.lower() == 'golem':
user = 'ctl'
return user.lower() + "@mit.edu"
return user.lower() + "|" + realm.upper() + "@mit.edu"