From b0240b0dacfe3ba295c817401525a9c35323e491 Mon Sep 17 00:00:00 2001 From: jake Date: Sat, 31 Aug 2024 21:17:47 -0400 Subject: [PATCH] dont send messages to owncast chat when not streaming --- myapp.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/myapp.pl b/myapp.pl index 506d6c1..d16e081 100755 --- a/myapp.pl +++ b/myapp.pl @@ -245,10 +245,10 @@ sub send_chat_to_owncast ($body, $nick) { json => {body => $body}); } } + $ua->post("$ENV{ OWNCAST_URL }/api/integrations/chat/send" => + {'Authorization' => "Bearer $ENV{ OWNCAST_ACCESS_TOKEN }" } => + json => {body => "\\<$nick\\> $body"}); } - $ua->post("$ENV{ OWNCAST_URL }/api/integrations/chat/send" => - {'Authorization' => "Bearer $ENV{ OWNCAST_ACCESS_TOKEN }" } => - json => {body => "\\<$nick\\> $body"}); } sub send_system_chat_to_owncast ($body) {