presence: Add user_id to presence event.

In a later commit, we will eliminate email for
clients who have set slim_presence as their
preference.
This commit is contained in:
Steve Howell
2020-02-03 15:25:13 +00:00
committed by Tim Abbott
parent 36aee9e69c
commit a672a00677
7 changed files with 13 additions and 23 deletions

View File

@@ -380,13 +380,7 @@ exports.initialize = function () {
setInterval(get_full_presence_list_update, ACTIVE_PING_INTERVAL_MS);
};
exports.update_presence_info = function (email, info, server_time) {
const user_id = people.get_user_id(email);
if (!user_id) {
blueslip.warn('unknown email: ' + email);
return;
}
exports.update_presence_info = function (user_id, info, server_time) {
presence.set_info_for_user(user_id, info, server_time);
exports.redraw_user(user_id);
exports.update_huddles();

View File

@@ -56,7 +56,7 @@ exports.dispatch_normal_event = function dispatch_normal_event(event) {
break;
case 'presence':
activity.update_presence_info(event.email, event.presence, event.server_timestamp);
activity.update_presence_info(event.user_id, event.presence, event.server_timestamp);
break;
case 'restart': {