fix: webhook message to peer (#2678)

This commit is contained in:
Daniel Salazar
2026-03-17 13:33:01 -07:00
committed by GitHub
parent 8118582496
commit 6352bc6a9a
@@ -320,6 +320,7 @@ export class BroadcastService extends BaseService {
let nextNonce = this.#outgoingNonceByPeer.get(peerId) ?? 0;
this.#outgoingNonceByPeer.set(peerId, nextNonce + 1);
console.log('Sending webhook message to peer', { peerId });
const timestamp = Math.floor(Date.now() / 1000);
const body = { events };
@@ -328,7 +329,6 @@ export class BroadcastService extends BaseService {
const signature = createHmac('sha256', mySecretKey).update(payloadToSign).digest('hex');
const myPublicKey = this.config.webhook?.key ?? '';
console.debug('Sending webhook message to peer', { peerId });
const response = await fetch(url, {
method: 'POST',
headers: {