feat: added reply, delete and message reaction in chatwoot v3.3.1

This commit is contained in:
Davidson Gomes
2023-12-12 15:16:09 -03:00
parent 3e904aa160
commit ae66be197e
7 changed files with 264 additions and 21 deletions

View File

@@ -22,6 +22,7 @@ export class MessageRaw {
source?: 'android' | 'web' | 'ios';
source_id?: string;
source_reply_id?: string;
chatwootMessageId?: string;
}
const messageSchema = new Schema<MessageRaw>({
@@ -39,6 +40,7 @@ const messageSchema = new Schema<MessageRaw>({
source: { type: String, minlength: 3, enum: ['android', 'web', 'ios'] },
messageTimestamp: { type: Number, required: true },
owner: { type: String, required: true, minlength: 1 },
chatwootMessageId: { type: String, required: false },
});
export const MessageModel = dbserver?.model(MessageRaw.name, messageSchema, 'messages');