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

@@ -65,8 +65,7 @@ async function cancelRequest(follower: User, followee: User) {
const webhooks = (await getActiveWebhooks()).filter(x => x.userId === follower.id && x.on.includes('unfollow'));
for (const webhook of webhooks) {
webhookDeliver(webhook, {
type: 'unfollow',
webhookDeliver(webhook, 'unfollow', {
user: packed,
});
}
@@ -118,8 +117,7 @@ async function unFollow(follower: User, followee: User) {
const webhooks = (await getActiveWebhooks()).filter(x => x.userId === follower.id && x.on.includes('unfollow'));
for (const webhook of webhooks) {
webhookDeliver(webhook, {
type: 'unfollow',
webhookDeliver(webhook, 'unfollow', {
user: packed,
});
}