mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-27 07:37:44 -06:00
Add labels property to ContactRaw model and update labels in LABELS_ASSOCIATION event
This commit is contained in:
@@ -8,6 +8,7 @@ export class ContactRaw {
|
||||
id?: string;
|
||||
profilePictureUrl?: string;
|
||||
owner: string;
|
||||
labels?: string[];
|
||||
}
|
||||
|
||||
type ContactRawBoolean<T> = {
|
||||
@@ -21,6 +22,7 @@ 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