лаба 4 на оценку 5

This commit is contained in:
2026-10-30 12:27:49 +03:00
parent 7860d81fa1
commit f9444a3965
59 changed files with 4696 additions and 90 deletions
+7 -2
View File
@@ -143,7 +143,12 @@ export const api = {
);
},
sendMessage(chatID: string, text: string, idempotencyKey: string): Promise<Message> {
sendMessage(
chatID: string,
text: string,
idempotencyKey: string,
attachmentIDs: string[] = [],
): Promise<Message> {
return request<Message>(
`${browserApi}/chats/${encodeURIComponent(chatID)}/messages`,
{
@@ -151,7 +156,7 @@ export const api = {
headers: {
"Idempotency-Key": idempotencyKey,
},
body: { text },
body: { text, attachment_ids: attachmentIDs },
},
);
},
+1
View File
@@ -24,6 +24,7 @@ export type Message = {
chat_id: string;
sender_id: string;
text: string;
attachment_ids: string[];
created_at: string;
};