Generate message.pm_with_url more directly from ids.

We have added people.pm_with_url(message), which computes a
PM url from a private message using user ids rather than emails.

We call this in add_message_metadata(), since the slugs will
be valid even if emails change, so we don't need to compute
them on the fly during message rendering.
This commit is contained in:
Steve Howell
2017-02-06 11:48:01 -08:00
committed by Tim Abbott
parent 8ed0e09c1f
commit 44f155e7b2
4 changed files with 101 additions and 1 deletions

View File

@@ -153,6 +153,7 @@ function add_message_metadata(message) {
message.reply_to = util.normalize_recipients(
exports.get_pm_emails(message));
message.display_reply_to = exports.get_pm_full_names(message);
message.pm_with_url = people.pm_with_url(message);
exports.process_message_for_recent_private_messages(message);
break;