feat: webhook add title and time

This commit is contained in:
moonrailgun 2024-06-20 00:08:30 +08:00
parent 61c1b0e065
commit a91d1ffffe

View File

@ -1,6 +1,7 @@
import { NotificationProvider } from './type'; import { NotificationProvider } from './type';
import { baseContentTokenizer } from '../token'; import { baseContentTokenizer } from '../token';
import axios from 'axios'; import axios from 'axios';
import dayjs from 'dayjs';
interface WebhookPayload { interface WebhookPayload {
webhookUrl: string; webhookUrl: string;
@ -16,8 +17,10 @@ export const webhook: NotificationProvider = {
await axios.post(webhookUrl, { await axios.post(webhookUrl, {
notification, notification,
title,
content, content,
raw: message, raw: message,
time: dayjs().toISOString(),
}); });
}, },
}; };