mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-26 23:27:45 -06:00
Changed label update to chat instead of contacts
This commit is contained in:
@@ -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');
|
||||
|
||||
@@ -8,7 +8,6 @@ export class ContactRaw {
|
||||
id?: string;
|
||||
profilePictureUrl?: string;
|
||||
owner: string;
|
||||
labels?: string[];
|
||||
}
|
||||
|
||||
type ContactRawBoolean<T> = {
|
||||
@@ -22,7 +21,6 @@ const contactSchema = new Schema<ContactRaw>({
|
||||
id: { type: String, required: true, minlength: 1 },
|
||||
profilePictureUrl: { type: String, minlength: 1 },
|
||||
owner: { type: String, required: true, minlength: 1 },
|
||||
labels: { type: [String], default: [] },
|
||||
});
|
||||
|
||||
export const ContactModel = dbserver?.model(ContactRaw.name, contactSchema, 'contacts');
|
||||
|
||||
Reference in New Issue
Block a user