Fix feedback check to correctly use the recipients list.

Even for a PM, the "recipients" list is 2 people -- the sender and the
receiver.

(imported from commit 5503e0ee2abb643601a0a4e61366127914808245)
This commit is contained in:
Tim Abbott
2013-11-04 12:00:33 -05:00
parent fe1313ad76
commit 87271b57cd

View File

@@ -338,8 +338,8 @@ def do_send_messages(messages):
if message['stream'].invite_only:
data['invite_only'] = True
tornado_callbacks.send_notification(data)
if message['message'].recipient.type == Recipient.PERSONAL and \
message['recipients'][0].email == "feedback@zulip.com":
if (message['message'].recipient.type == Recipient.PERSONAL and
"feedback@zulip.com" in [up.email for up in message['recipients']]):
queue_json_publish(
'feedback_messages',
message['message'].to_dict(apply_markdown=False),