feat(chats): add per-user pinned chats and pinned sorting

This commit is contained in:
2026-03-08 09:54:43 +03:00
parent fdf973eeab
commit 8cdcd9531d
9 changed files with 139 additions and 4 deletions

View File

@@ -198,6 +198,16 @@ export async function unarchiveChat(chatId: number): Promise<Chat> {
return data;
}
export async function pinChat(chatId: number): Promise<Chat> {
const { data } = await http.post<Chat>(`/chats/${chatId}/pin-chat`);
return data;
}
export async function unpinChat(chatId: number): Promise<Chat> {
const { data } = await http.post<Chat>(`/chats/${chatId}/unpin-chat`);
return data;
}
export async function deleteMessage(messageId: number, forAll = false): Promise<void> {
await http.delete(`/messages/${messageId}`, { params: { for_all: forAll } });
}