From a91d1ffffe41b61b9792d92865e8d8f65db27b0f Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Thu, 20 Jun 2024 00:08:30 +0800 Subject: [PATCH] feat: webhook add title and time --- src/server/model/notification/provider/webhook.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/server/model/notification/provider/webhook.ts b/src/server/model/notification/provider/webhook.ts index 5e21bd9..34496ff 100644 --- a/src/server/model/notification/provider/webhook.ts +++ b/src/server/model/notification/provider/webhook.ts @@ -1,6 +1,7 @@ import { NotificationProvider } from './type'; import { baseContentTokenizer } from '../token'; import axios from 'axios'; +import dayjs from 'dayjs'; interface WebhookPayload { webhookUrl: string; @@ -16,8 +17,10 @@ export const webhook: NotificationProvider = { await axios.post(webhookUrl, { notification, + title, content, raw: message, + time: dayjs().toISOString(), }); }, };