Skip to content

Commit

Permalink
fix(webhook): fix webhooks (#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelmasse authored Nov 22, 2021
1 parent a54b554 commit 8b4b60f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/server/src/stream/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export class StreamService extends Service {
}

if (yn(process.env.LOGGING_ENABLED)) {
this.logger.debug(`${clc.blackBright(`[${clientId}]`)} ${clc.cyan(type)}`, data)
this.logger.debug(`${clc.blackBright(`[${clientId}]`)} ${clc.cyan(type)}`, payload)
}

if (userId) {
Expand All @@ -135,12 +135,12 @@ export class StreamService extends Service {

if (source?.client?.id !== clientId) {
if (yn(process.env.SPINNED)) {
void this.posts.send(process.env.SPINNED_URL!, data)
void this.posts.send(process.env.SPINNED_URL!, payload)
} else {
const webhooks = await this.webhooks.list(clientId)

for (const webhook of webhooks) {
void this.posts.send(webhook.url, data, { 'x-webhook-token': webhook.token })
void this.posts.send(webhook.url, payload, { 'x-webhook-token': webhook.token })
}
}
}
Expand Down

0 comments on commit 8b4b60f

Please sign in to comment.