diff --git a/notification/microsoft/office365/teams/custom/webhookapi.pm b/notification/microsoft/office365/teams/custom/webhookapi.pm index cda650aed..5efec8688 100644 --- a/notification/microsoft/office365/teams/custom/webhookapi.pm +++ b/notification/microsoft/office365/teams/custom/webhookapi.pm @@ -91,7 +91,7 @@ sub json_decode { $options{content} =~ s/\r//mg; my $decoded; eval { - $decoded = JSON::XS->new->utf8->decode($options{content}); + $decoded = JSON::XS->new->allow_nonref(1)->utf8->decode($options{content}); }; if ($@) { $self->{output}->add_option_msg(short_msg => "Cannot decode json response: $@"); @@ -117,7 +117,6 @@ sub teams_post_notification { $self->{output}->add_option_msg(short_msg => 'Error while retrieving data (add --debug option for detailed message)'); $self->{output}->option_exit(); } - use Data::Dumper; print Dumper($decoded); return $decoded; }