mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-25 06:37:45 -06:00
Messages are imported direct to chatwoot database. Media and group messages are ignored. New env.yml variables: CHATWOOT_IMPORT_DATABASE_CONNECTION_URI: URI to connect direct on chatwoot database. CHATWOOT_IMPORT_PLACEHOLDER_MEDIA_MESSAGE: Indicates to use a text placeholder on media messages. New instance setting: sync_full_history: Indicates to request a full history sync to baileys. New chatwoot options: import_contacts: Indicates to import contacts. import_messages: Indicates to import messages. days_limit_import_messages: Number of days to limit history messages to import.
29 lines
907 B
TypeScript
29 lines
907 B
TypeScript
import { Schema } from 'mongoose';
|
|
|
|
import { dbserver } from '../../libs/db.connect';
|
|
|
|
export class SettingsRaw {
|
|
_id?: string;
|
|
reject_call?: boolean;
|
|
msg_call?: string;
|
|
groups_ignore?: boolean;
|
|
always_online?: boolean;
|
|
read_messages?: boolean;
|
|
read_status?: boolean;
|
|
sync_full_history?: boolean;
|
|
}
|
|
|
|
const settingsSchema = new Schema<SettingsRaw>({
|
|
_id: { type: String, _id: true },
|
|
reject_call: { type: Boolean, required: true },
|
|
msg_call: { type: String, required: true },
|
|
groups_ignore: { type: Boolean, required: true },
|
|
always_online: { type: Boolean, required: true },
|
|
read_messages: { type: Boolean, required: true },
|
|
read_status: { type: Boolean, required: true },
|
|
sync_full_history: { type: Boolean, required: true },
|
|
});
|
|
|
|
export const SettingsModel = dbserver?.model(SettingsRaw.name, settingsSchema, 'settings');
|
|
export type ISettingsModel = typeof SettingsModel;
|