From c6a8e5b24dfbce810a3a4932fa49709adc0ceb10 Mon Sep 17 00:00:00 2001
From: Thomas Hansen
Date: Sun, 31 Dec 2023 09:26:24 +0200
Subject: [PATCH] b
---
.../misc/{send-email.hl => email-send.hl} | 9 ++++---
.../actions/{misc => strings}/strings-join.hl | 0
.../actions/strings/strings-replace.hl | 26 +++++++++++++++++++
3 files changed, 31 insertions(+), 4 deletions(-)
rename backend/files/misc/workflows/actions/misc/{send-email.hl => email-send.hl} (84%)
rename backend/files/misc/workflows/actions/{misc => strings}/strings-join.hl (100%)
create mode 100644 backend/files/misc/workflows/actions/strings/strings-replace.hl
diff --git a/backend/files/misc/workflows/actions/misc/send-email.hl b/backend/files/misc/workflows/actions/misc/email-send.hl
similarity index 84%
rename from backend/files/misc/workflows/actions/misc/send-email.hl
rename to backend/files/misc/workflows/actions/misc/email-send.hl
index ff450bfd81..415350c55c 100644
--- a/backend/files/misc/workflows/actions/misc/send-email.hl
+++ b/backend/files/misc/workflows/actions/misc/email-send.hl
@@ -1,8 +1,9 @@
/*
- * Sends an email to the specified [name]/[email] recipient,
- * with the specified [subject] and [body], using the default from email address and name
- * from your configuration settings.
+ * Sends an email to the specified [name]/[email] recipient, with the specified [subject] and [body].
+ *
+ * Optionally supply [from] and [from-email] as name/email sender. If you don't supply from, this action
+ * will use the default sender settings from your configuration.
*/
.arguments
name
@@ -25,7 +26,7 @@
mandatory:bool:true
html
type:bool
- mandatory:bool:false
+ default:bool:true
.icon:email
// Sanity checking invocation.
diff --git a/backend/files/misc/workflows/actions/misc/strings-join.hl b/backend/files/misc/workflows/actions/strings/strings-join.hl
similarity index 100%
rename from backend/files/misc/workflows/actions/misc/strings-join.hl
rename to backend/files/misc/workflows/actions/strings/strings-join.hl
diff --git a/backend/files/misc/workflows/actions/strings/strings-replace.hl b/backend/files/misc/workflows/actions/strings/strings-replace.hl
new file mode 100644
index 0000000000..108ca7bb2e
--- /dev/null
+++ b/backend/files/misc/workflows/actions/strings/strings-replace.hl
@@ -0,0 +1,26 @@
+
+/*
+ * Replaces the specified [source] string's [what] occurencies with [with].
+ *
+ * Returns the result as [result].
+ */
+.arguments
+ source
+ type:string
+ mandatory:bool:true
+ what
+ type:string
+ mandatory:bool:true
+ with
+ type:string
+ mandatory:bool:true
+.icon:settings
+
+// Joining strings.
+strings.replace:x:@.arguments/*/source
+ get-value:x:@.arguments/*/what
+ get-value:x:@.arguments/*/with
+
+// Returning result to caller.
+yield
+ result:x:@strings.replace
|