mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 00:46:03 +00:00
user_pill: Show deactivated icon in user_display_only_pill.
This commit adds code to show the deactivated icon for deactivated users.
This commit is contained in:
@@ -181,12 +181,15 @@ export function get_sub_by_id(stream_id: number): StreamSubscription | undefined
|
||||
return stream_info.get(stream_id);
|
||||
}
|
||||
|
||||
export function maybe_get_creator_details(creator_id: number | null): User | undefined {
|
||||
export function maybe_get_creator_details(
|
||||
creator_id: number | null,
|
||||
): (User & {is_active: boolean}) | undefined {
|
||||
if (creator_id === null) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return people.get_user_by_id_assert_valid(creator_id);
|
||||
const creator = people.get_user_by_id_assert_valid(creator_id);
|
||||
return {...creator, is_active: people.is_person_active(creator_id)};
|
||||
}
|
||||
|
||||
export function get_stream_id(name: string): number | undefined {
|
||||
|
||||
Reference in New Issue
Block a user