presence_data: Skip fetching presence_data in user_card_popover for spectators.

This commit is contained in:
Maneesh Shukla
2025-03-05 17:19:40 +05:30
committed by Tim Abbott
parent d430263906
commit ae6acd9f05

View File

@@ -239,6 +239,10 @@ type UserCardPopoverData = {
}; };
export let fetch_presence_for_popover = (user_id: number): void => { export let fetch_presence_for_popover = (user_id: number): void => {
if (page_params.is_spectator) {
return;
}
if (!people.is_active_user_for_popover(user_id) || people.get_by_user_id(user_id).is_bot) { if (!people.is_active_user_for_popover(user_id) || people.get_by_user_id(user_id).is_bot) {
return; return;
} }