@jonatandor35 Thank you so much for taking time to look into this!
RE: verifyWebhook, it is asynchronous. But this portion of the code (http-functions module) runs on raw promises. Do I really need to use await within promise .then/.catch chain?
Also, verification hasn’t failed once during my extensive testing.
RE: line 18, what’s the benefit of using reject there and handling it in .catch? I need to return either ok or serverError, so that third party API doesn’t bombard us with repeated attempts to resend the hook.
RE: line 22, what makes you think it returns void? handlePosterWebhook uses async/await approach and as far as I remember I don’t need to explicitly return await’ed promise.
RE: line 46, no, this is a JSON string that comes in ‘data’ field in some of the webhooks, needs to be parsed separately.