Changed label update to chat instead of contacts

This commit is contained in:
Judson Cairo
2024-02-08 15:38:27 -03:00
parent a2622cb38e
commit 3df4e8d2ba
4 changed files with 83 additions and 21 deletions

View File

@@ -7,6 +7,7 @@ export class ChatRaw {
id?: string;
owner: string;
lastMsgTimestamp?: number;
labels?: string[];
}
type ChatRawBoolean<T> = {
@@ -18,6 +19,7 @@ const chatSchema = new Schema<ChatRaw>({
_id: { type: String, _id: true },
id: { type: String, required: true, minlength: 1 },
owner: { type: String, required: true, minlength: 1 },
labels: { type: [String], default: [] },
});
export const ChatModel = dbserver?.model(ChatRaw.name, chatSchema, 'chats');