Skip to content

Commit

Permalink
Apply formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
domwebber committed Dec 5, 2024
1 parent 01ce620 commit 726a015
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Webhook/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,7 @@ export default class Webhook {
// See: https://github.com/WhatsApp/WhatsApp-Nodejs-SDK/blob/58ca3d5fceea604e18393734578d9a7944a37b15/src/utils.ts#L77-L82
// See: https://developers.facebook.com/docs/messenger-platform/webhooks#validate-payloads
const getCalculatedSignature = (alg: string) => (appSecret: string) =>
createHmac(alg, appSecret)
.update(bodyString, "utf8")
.digest("hex");
createHmac(alg, appSecret).update(bodyString, "utf8").digest("hex");

const checkSignature = (alg: string, signature: string) => {
const signatureCalculator = getCalculatedSignature(alg);
Expand Down

0 comments on commit 726a015

Please sign in to comment.