Merge pull request #2683 from insertjokehere/fix_error_on_successful_webhook

Treat any 2xx webhook response status code as success
This commit is contained in:
Lauri Ojansivu 2019-09-06 19:22:36 +03:00 committed by GitHub
commit ea26f70669
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -124,7 +124,7 @@ Meteor.methods({
const url = integration.url;
const response = postCatchError(url, options);
if (response && response.statusCode && response.statusCode === 200) {
if (response && response.statusCode && response.statusCode >= 200 && response.statusCode < 300) {
if (is2way) {
const cid = params.commentId;
const tooSoon = Lock.has(cid); // if an activity happens to fast, notification shouldn't fire with the same id