feat(web): improve message UX, voice gestures, and attachments
Some checks failed
CI / test (push) Failing after 21s

This commit is contained in:
2026-03-08 10:20:52 +03:00
parent 52c41b6958
commit 6a96a99775
9 changed files with 857 additions and 212 deletions

View File

@@ -1,5 +1,17 @@
import { http } from "./http";
import type { Chat, ChatDetail, ChatInviteLink, ChatMember, ChatMemberRole, ChatType, DiscoverChat, Message, MessageReaction, MessageType } from "../chat/types";
import type {
Chat,
ChatAttachment,
ChatDetail,
ChatInviteLink,
ChatMember,
ChatMemberRole,
ChatType,
DiscoverChat,
Message,
MessageReaction,
MessageType
} from "../chat/types";
import axios from "axios";
export interface ChatNotificationSettings {
@@ -225,6 +237,16 @@ export async function joinByInvite(token: string): Promise<Chat> {
return data;
}
export async function getChatAttachments(chatId: number, limit = 100, beforeId?: number): Promise<ChatAttachment[]> {
const { data } = await http.get<ChatAttachment[]>(`/media/chats/${chatId}/attachments`, {
params: {
limit,
before_id: beforeId
}
});
return data;
}
export async function deleteMessage(messageId: number, forAll = false): Promise<void> {
await http.delete(`/messages/${messageId}`, { params: { for_all: forAll } });
}