mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 23:43:43 +00:00
recent_view_ui: Make tooltip data compatible with buddy_data.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
df657e7208
commit
4f297bee32
@@ -232,16 +232,15 @@ export function info_for(user_id: number): BuddyUserInfo {
|
||||
};
|
||||
}
|
||||
|
||||
export function get_title_data(
|
||||
user_ids_string: string,
|
||||
is_group: boolean,
|
||||
): {
|
||||
export type TitleData = {
|
||||
first_line: string;
|
||||
second_line: string | undefined;
|
||||
third_line: string;
|
||||
show_you?: boolean;
|
||||
is_deactivated?: boolean;
|
||||
} {
|
||||
};
|
||||
|
||||
export function get_title_data(user_ids_string: string, is_group: boolean): TitleData {
|
||||
if (is_group) {
|
||||
// For groups, just return a string with recipient names.
|
||||
return {
|
||||
|
||||
@@ -496,11 +496,7 @@ function message_to_conversation_unread_count(msg: Message): number {
|
||||
return unread.num_unread_for_topic(msg.stream_id, msg.topic);
|
||||
}
|
||||
|
||||
export function get_pm_tooltip_data(user_ids_string: string): {
|
||||
first_line: string;
|
||||
second_line: string;
|
||||
third_line?: string;
|
||||
} {
|
||||
export function get_pm_tooltip_data(user_ids_string: string): buddy_data.TitleData {
|
||||
const user_id = Number.parseInt(user_ids_string, 10);
|
||||
const person = people.get_by_user_id(user_id);
|
||||
|
||||
@@ -516,6 +512,7 @@ export function get_pm_tooltip_data(user_ids_string: string): {
|
||||
return {
|
||||
first_line: person.full_name,
|
||||
second_line: bot_owner_name,
|
||||
third_line: "",
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user