mirror of https://github.com/zulip/zulip.git
user popover: Don't throw an exception for deactivated target users.
Ideally, we'd fix this at the root cause, via #4322, but this will at least suppress the exception for now.
This commit is contained in:
parent
3e1bf86ced
commit
e68de7ac8d
|
@ -55,7 +55,16 @@ function user_last_seen_time_status(user_id) {
|
||||||
// We don't send presence data to clients in Zephyr mirroring realms
|
// We don't send presence data to clients in Zephyr mirroring realms
|
||||||
return i18n.t("Unknown");
|
return i18n.t("Unknown");
|
||||||
}
|
}
|
||||||
return timerender.last_seen_status_from_date(presence.last_active_date(user_id).clone());
|
|
||||||
|
// TODO: If the user account has been deactivated, it won't appear
|
||||||
|
// in the presence data set. Ideally, we'd have a cleaner
|
||||||
|
// solution that had us understand that state declaratively and
|
||||||
|
// thus not need this check (see #4322).
|
||||||
|
var last_active_date = presence.last_active_date(user_id);
|
||||||
|
if (last_active_date === undefined) {
|
||||||
|
return i18n.t("Unknown");
|
||||||
|
}
|
||||||
|
return timerender.last_seen_status_from_date(last_active_date.clone());
|
||||||
}
|
}
|
||||||
|
|
||||||
function show_message_info_popover(element, id) {
|
function show_message_info_popover(element, id) {
|
||||||
|
|
Loading…
Reference in New Issue