fix: don't send unsolicited stuff: this might break json

This commit is contained in:
frederik
2024-03-12 18:06:56 +01:00
parent 6c6247cf19
commit 3246b61c41
4 changed files with 33 additions and 89 deletions
+4
View File
@@ -307,6 +307,7 @@ if(isset($_GET['sendtest']) && $_GET['sendtest'] == "true") {
$title = str_replace("\$sens", $sens, $title);
$title = str_replace("\$overlap", $overlap, $title);
$title = str_replace("\$flickrimage", $exampleimage, $title);
$title = str_replace("\$reason", 'Test message', $title);
$body = str_replace("\$sciname", $sciname, $body);
$body = str_replace("\$comname", $comname, $body);
@@ -322,6 +323,7 @@ if(isset($_GET['sendtest']) && $_GET['sendtest'] == "true") {
$body = str_replace("\$sens", $sens, $body);
$body = str_replace("\$overlap", $overlap, $body);
$body = str_replace("\$flickrimage", $exampleimage, $body);
$body = str_replace("\$reason", 'Test message', $body);
$temp = tmpfile();
$tpath = stream_get_meta_data($temp)['uri'];
@@ -565,6 +567,8 @@ https://discordapp.com/api/webhooks/{WebhookID}/{WebhookToken}
<dd>Overlap set in "Advanced Settings"</dd>
<dt>$flickrimage</dt>
<dd>A preview image of the detected species from Flickr. Set your API key below.</dd>
<dt>$reason</dt>
<dd>The reason a message was sent</dd>
</dl>
<p>Use the variables defined above to customize your notification title and body.</p>
<label for="apprise_notification_title">Notification Title: </label>