chats: add chat avatars and profile view-only modal
All checks were successful
CI / test (push) Successful in 23s

This commit is contained in:
2026-03-08 13:53:29 +03:00
parent f7413bc626
commit bc9d943d11
10 changed files with 236 additions and 114 deletions

View File

@@ -302,6 +302,17 @@ export async function updateChatTitle(chatId: number, title: string): Promise<Ch
return data;
}
export interface ChatProfilePatch {
title?: string;
description?: string | null;
avatar_url?: string | null;
}
export async function updateChatProfile(chatId: number, payload: ChatProfilePatch): Promise<Chat> {
const { data } = await http.patch<Chat>(`/chats/${chatId}/profile`, payload);
return data;
}
export async function addChatMember(chatId: number, userId: number): Promise<ChatMember> {
const { data } = await http.post<ChatMember>(`/chats/${chatId}/members`, { user_id: userId });
return data;