From 81dd9d08dcc6480d56adff93bbfb358f1ecd64d9 Mon Sep 17 00:00:00 2001 From: Martin Rode Date: Thu, 21 Dec 2023 08:41:29 +0100 Subject: [PATCH] Support info.config for webhook callbacks 6.8.1 no longer sends the entire base config via the webhook payload. Adjusted the script to read the config from the node info parameter. --- server/db_pre_save+webhook/set_comment.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/db_pre_save+webhook/set_comment.js b/server/db_pre_save+webhook/set_comment.js index d10fca1..1e54cd7 100644 --- a/server/db_pre_save+webhook/set_comment.js +++ b/server/db_pre_save+webhook/set_comment.js @@ -23,6 +23,10 @@ process.stdin.on('end', () => { if (!data.info) { data.info = {} } + // when we receive the payload from a webook, the config is not included + if (!data.info.config && info?.config) { + data.info.config = info.config + } } catch(e) { console.error(`Could not parse input: ${e.message}`, e.stack); process.exit(1);