mirror of https://github.com/zulip/zulip.git
people: Don’t reference nonexistent page_params.is_bot.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
9703b4d70b
commit
a5d51a0895
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue