Skip to content

Commit

Permalink
Merge pull request #285 from domwebber/main
Browse files Browse the repository at this point in the history
Resolve Linter Issues
  • Loading branch information
domwebber authored Dec 5, 2024
2 parents 69251f4 + 726a015 commit 57122e9
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, "utf-8")
.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 57122e9

Please sign in to comment.