people: Don’t reference nonexistent page_params.is_bot.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2023-12-29 12:28:00 -08:00 committed by Anders Kaseorg
parent 9703b4d70b
commit a5d51a0895
2 changed files with 2 additions and 7 deletions

View File

@ -27,7 +27,6 @@ export const page_params: {
furthest_read_time: number | null;
is_admin: boolean;
is_billing_admin: boolean;
is_bot: boolean;
is_guest: boolean;
is_moderator: boolean;
is_owner: boolean;

View File

@ -978,16 +978,12 @@ export function is_active_user_for_popover(user_id: number): boolean {
}
export function is_current_user_only_owner(): boolean {
if (!page_params.is_owner || page_params.is_bot) {
if (!page_params.is_owner) {
return false;
}
let active_owners = 0;
for (const person of active_user_dict.values()) {
if (person.is_owner && !person.is_bot) {
active_owners += 1;
}
if (active_owners > 1) {
if (person.is_owner && !person.is_bot && person.user_id !== my_user_id) {
return false;
}
}