From 85f98621efff8aaaa6ff2ae1cac43e1b16d23e3b Mon Sep 17 00:00:00 2001 From: Joseph Huckaby Date: Wed, 19 Apr 2023 19:55:14 -0700 Subject: [PATCH] Version 0.9.21 - Support for Discord Web Hooks, added `content` property into web hook text props. - Thanks to @mikeTWC1984 for this fix! --- lib/job.js | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/job.js b/lib/job.js index 6282c702..bffa10a0 100644 --- a/lib/job.js +++ b/lib/job.js @@ -275,7 +275,7 @@ module.exports = Class.create({ var hook_text_templates = self.server.config.get('web_hook_text_templates') || self.defaultWebHookTextTemplates; if (hook_text_templates[hook_data.action]) { - hook_data.text = Tools.sub( hook_text_templates[hook_data.action], hook_data ); + hook_data.text = hook_data.content = Tools.sub( hook_text_templates[hook_data.action], hook_data ); // include web_hook_config_keys if configured if (self.server.config.get('web_hook_config_keys')) { @@ -1412,7 +1412,7 @@ module.exports = Class.create({ if (job.code != 0) hook_action = 'job_failure'; if (hook_text_templates[hook_action]) { - hook_data.text = Tools.sub( hook_text_templates[hook_action], hook_data ); + hook_data.text = hook_data.content = Tools.sub( hook_text_templates[hook_action], hook_data ); // include web_hook_config_keys if configured if (this.server.config.get('web_hook_config_keys')) { diff --git a/package.json b/package.json index 818630f1..46464b30 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Cronicle", - "version": "0.9.20", + "version": "0.9.21", "description": "A simple, distributed task scheduler and runner with a web based UI.", "author": "Joseph Huckaby ", "homepage": "https://github.com/jhuckaby/Cronicle",