feat(web): add message edit flow in context menu and composer
All checks were successful
CI / test (push) Successful in 24s
All checks were successful
CI / test (push) Successful in 24s
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user