소스 검색

Treat any 2xx webhook response status code as success

William Hughes 5 년 전
부모
커밋
682c23e011
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      server/notifications/outgoing.js

+ 1 - 1
server/notifications/outgoing.js

@@ -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