feat(web): add message edit flow in context menu and composer
All checks were successful
CI / test (push) Successful in 24s

This commit is contained in:
2026-03-08 13:22:57 +03:00
parent 041f7ac171
commit 704781e359
4 changed files with 82 additions and 5 deletions

View File

@@ -258,6 +258,11 @@ export async function deleteMessage(messageId: number, forAll = false): Promise<
await http.delete(`/messages/${messageId}`, { params: { for_all: forAll } });
}
export async function editMessage(messageId: number, text: string): Promise<Message> {
const { data } = await http.put<Message>(`/messages/${messageId}`, { text });
return data;
}
export async function discoverChats(query?: string): Promise<DiscoverChat[]> {
const { data } = await http.get<DiscoverChat[]>("/chats/discover", {
params: query?.trim() ? { query: query.trim() } : undefined