From c19be5e39ec76b59fe7c8838d56780673af9ab12 Mon Sep 17 00:00:00 2001 From: Cory Lynch Date: Mon, 19 Jun 2017 04:07:33 -0400 Subject: [PATCH] Change conversation links to contain user's own email. Fixes #2360. --- static/js/narrow.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/static/js/narrow.js b/static/js/narrow.js index 9766148e10..0926e5c4ff 100644 --- a/static/js/narrow.js +++ b/static/js/narrow.js @@ -564,8 +564,14 @@ exports.by_conversation_and_time_uri = function (message, is_absolute_url) { "/subject/" + hash_util.encodeHashComponent(message.subject) + "/near/" + hash_util.encodeHashComponent(message.id); } + + // Include your own email in this URI if it's not there already + var all_emails = message.reply_to; + if (all_emails.indexOf(people.my_current_email()) === -1) { + all_emails += "," + people.my_current_email(); + } return absolute_url + "#narrow/pm-with/" + - hash_util.encodeHashComponent(message.reply_to) + + hash_util.encodeHashComponent(all_emails) + "/near/" + hash_util.encodeHashComponent(message.id); };