Change conversation links to contain user's own email.

Fixes #2360.
This commit is contained in:
Cory Lynch 2017-06-19 04:07:33 -04:00 committed by showell
parent 6d90d7ccbb
commit c19be5e39e

View File

@ -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);
};