storage: persist message attachments and user AI settings

This commit is contained in:
2026-05-10 22:52:10 +03:00
parent 28f67aefc2
commit d666244863
14 changed files with 1147 additions and 45 deletions
+11
View File
@@ -0,0 +1,11 @@
export type StoredAttachmentKind = "image" | "document" | "audio" | "video" | "video-note";
export type StoredAttachment = {
kind: StoredAttachmentKind;
fileId: string;
fileUniqueId?: string;
fileName: string;
mimeType?: string;
cachePath: string;
};
+5 -1
View File
@@ -1,9 +1,13 @@
import {StoredAttachment} from "./stored-attachment";
export type StoredMessage = {
chatId: number;
id: number;
replyToMessageId?: number;
fromId: number;
text?: string | null;
quoteText?: string | null;
date: number;
photoMaxSizeFilePath?: string[] | null;
};
attachments?: StoredAttachment[] | null;
};
+9 -3
View File
@@ -2,7 +2,13 @@ export type StoredUser = {
id: number;
isBot: boolean;
firstName: string;
lastName?: string | null;
userName?: string | null;
lastName?: string;
userName?: string;
isPremium?: boolean;
}
langCode?: string;
interfaceLanguage?: string;
aiProvider?: string;
aiResponseLanguage?: string;
aiContextSize?: number;
aiVoiceMode?: string;
}