mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
- Created UserWhatsApp model to manage WhatsApp numbers linked to users and projects. - Implemented WhatsAppLog model to log messages sent via WhatsApp, including details like recipient, status, and associated incidents or alerts. - Developed WhatsAppLogService for managing WhatsApp log entries, including automatic deletion of old logs if billing is enabled. - Introduced WhatsAppService for sending WhatsApp messages with various contextual options.
16 lines
396 B
TypeScript
16 lines
396 B
TypeScript
import { IsBillingEnabled } from "../EnvironmentConfig";
|
|
import DatabaseService from "./DatabaseService";
|
|
import Model from "../../Models/DatabaseModels/WhatsAppLog";
|
|
|
|
export class Service extends DatabaseService<Model> {
|
|
public constructor() {
|
|
super(Model);
|
|
|
|
if (IsBillingEnabled) {
|
|
this.hardDeleteItemsOlderThanInDays("createdAt", 3);
|
|
}
|
|
}
|
|
}
|
|
|
|
export default new Service();
|