Recognize new-style client name for Jabber mirror

(imported from commit 3c1f8120f4daa809e0844602bc8bea659837d84e)
This commit is contained in:
Zev Benjamin
2014-02-28 14:53:54 -05:00
parent 8155b8ea04
commit 406e3025fb
2 changed files with 3 additions and 3 deletions

View File

@@ -662,7 +662,7 @@ def check_message(sender, client, message_type_name, message_to,
raise JsonableError("Not authorized to send to stream '%s'" % (stream.name,))
elif message_type_name == 'private':
mirror_message = client and client.name in ["zephyr_mirror", "irc_mirror", "jabber_mirror"]
mirror_message = client and client.name in ["zephyr_mirror", "irc_mirror", "jabber_mirror", "JabberMirror"]
not_forged_mirror_message = mirror_message and not forged
try:
recipient = recipient_for_emails(message_to, not_forged_mirror_message,

View File

@@ -615,7 +615,7 @@ def create_mirrored_message_users(request, user_profile, recipients):
elif request.client.name == "irc_mirror":
user_check = same_realm_irc_user
fullname_function = compute_irc_user_fullname
elif request.client.name == "jabber_mirror":
elif request.client.name in ("jabber_mirror", "JabberMirror"):
user_check = same_realm_user
fullname_function = compute_jabber_user_fullname
else:
@@ -708,7 +708,7 @@ def send_message_backend(request, user_profile,
if not realm:
return json_error("Unknown domain " + domain)
if client.name in ["zephyr_mirror", "irc_mirror", "jabber_mirror"]:
if client.name in ["zephyr_mirror", "irc_mirror", "jabber_mirror", "JabberMirror"]:
# Here's how security works for mirroring:
#
# For private messages, the message must be (1) both sent and