mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
Recognize new-style client name for Jabber mirror
(imported from commit 3c1f8120f4daa809e0844602bc8bea659837d84e)
This commit is contained in:
@@ -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,))
|
raise JsonableError("Not authorized to send to stream '%s'" % (stream.name,))
|
||||||
|
|
||||||
elif message_type_name == 'private':
|
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
|
not_forged_mirror_message = mirror_message and not forged
|
||||||
try:
|
try:
|
||||||
recipient = recipient_for_emails(message_to, not_forged_mirror_message,
|
recipient = recipient_for_emails(message_to, not_forged_mirror_message,
|
||||||
|
|||||||
@@ -615,7 +615,7 @@ def create_mirrored_message_users(request, user_profile, recipients):
|
|||||||
elif request.client.name == "irc_mirror":
|
elif request.client.name == "irc_mirror":
|
||||||
user_check = same_realm_irc_user
|
user_check = same_realm_irc_user
|
||||||
fullname_function = compute_irc_user_fullname
|
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
|
user_check = same_realm_user
|
||||||
fullname_function = compute_jabber_user_fullname
|
fullname_function = compute_jabber_user_fullname
|
||||||
else:
|
else:
|
||||||
@@ -708,7 +708,7 @@ def send_message_backend(request, user_profile,
|
|||||||
if not realm:
|
if not realm:
|
||||||
return json_error("Unknown domain " + domain)
|
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:
|
# Here's how security works for mirroring:
|
||||||
#
|
#
|
||||||
# For private messages, the message must be (1) both sent and
|
# For private messages, the message must be (1) both sent and
|
||||||
|
|||||||
Reference in New Issue
Block a user