From 19a0e4a69075c40fa181571c4786b5bc16fd14ef Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 9 Oct 2012 09:42:30 -0400 Subject: [PATCH] Fix totally backwards comparison and don't recompute the result. (imported from commit 90b6711b668449aa550e1fdd6412030866e459aa) --- zephyr/static/js/zephyr.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/zephyr/static/js/zephyr.js b/zephyr/static/js/zephyr.js index 9edcd1f111..7d86dad15d 100644 --- a/zephyr/static/js/zephyr.js +++ b/zephyr/static/js/zephyr.js @@ -130,12 +130,8 @@ function respond_to_zephyr() { // Until we allow sending zephyrs based on multiple meaningful // representations of a user (name, username, email, etc.), just // deal with emails. - recipient = zephyr.display_recipient; - if (recipient === email) { // that is, we sent the original message - recipient = zephyr.sender_email; - } show_compose('personal', $("#new_zephyr")); - $("#huddle_recipient").val(recipient); + $("#huddle_recipient").val(zephyr.reply_to); break; } } @@ -391,10 +387,10 @@ function add_zephyr_metadata(dummy, zephyr) { case 'personal': zephyr.is_personal = true; - if (zephyr.display_recipient === email) { // that is, we sent the original message - zephyr.reply_to = zephyr.sender_email; - } else { + if (zephyr.sender_email === email) { // that is, we sent the original message zephyr.reply_to = zephyr.display_recipient; + } else { + zephyr.reply_to = zephyr.sender_email; } zephyr.display_reply_to = zephyr.reply_to;