improve webhook

This commit is contained in:
syuilo
2022-04-03 22:36:30 +09:00
parent 7f5d189528
commit f8e6f3cc73
9 changed files with 36 additions and 28 deletions

View File

@ -97,8 +97,7 @@ export async function insertFollowingDoc(followee: { id: User['id']; host: User[
const webhooks = (await getActiveWebhooks()).filter(x => x.userId === follower.id && x.on.includes('follow'));
for (const webhook of webhooks) {
webhookDeliver(webhook, {
type: 'follow',
webhookDeliver(webhook, 'follow', {
user: packed,
});
}
@ -112,8 +111,7 @@ export async function insertFollowingDoc(followee: { id: User['id']; host: User[
const webhooks = (await getActiveWebhooks()).filter(x => x.userId === followee.id && x.on.includes('followed'));
for (const webhook of webhooks) {
webhookDeliver(webhook, {
type: 'followed',
webhookDeliver(webhook, 'followed', {
user: packed,
});
}