improve webhook
This commit is contained in:
parent
7f5d189528
commit
f8e6f3cc73
9 changed files with 36 additions and 28 deletions
|
|
@ -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,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue