Update PM unread counts more dynamically in the client.

When we process messages for unread counts, we now call
people.pm_reply_user_string() to get a string of user ids,
rather than using emails that may have changed since the
message was originally created.
This commit is contained in:
Steve Howell
2017-02-13 16:15:26 -08:00
committed by Tim Abbott
parent ed4adc5650
commit 4c53ad59f2
3 changed files with 31 additions and 10 deletions

View File

@@ -188,6 +188,16 @@ exports.get_recipients = function (user_ids_string) {
return names.join(', ');
};
exports.pm_reply_user_string = function (message) {
var user_ids = people.pm_with_user_ids(message);
if (!user_ids) {
return;
}
return user_ids.join(',');
};
exports.pm_reply_to = function (message) {
var user_ids = people.pm_with_user_ids(message);