|
@@ -68,12 +68,11 @@ sub send {
|
|
|
my $message = ${ $args_hr->{'text_body'} };
|
|
my $message = ${ $args_hr->{'text_body'} };
|
|
|
|
|
|
|
|
require Cpanel::AdminBin::Serializer;
|
|
require Cpanel::AdminBin::Serializer;
|
|
|
- my $message_json = Cpanel::AdminBin::Serializer::Dump(
|
|
|
|
|
- {
|
|
|
|
|
- 'text' => $subject,
|
|
|
|
|
- 'attachments' => [ { "text" => $message } ],
|
|
|
|
|
- }
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ my $dump_hr = {
|
|
|
|
|
+ 'text' => $subject,
|
|
|
|
|
+ };
|
|
|
|
|
+ $dump_hr->{'attachments'} = [ { "text" => $message } ] if $contact_hr->{'SLACKCOMPACT'};
|
|
|
|
|
+ my $message_json = Cpanel::AdminBin::Serializer::Dump($dump_hr);
|
|
|
|
|
|
|
|
# Send it
|
|
# Send it
|
|
|
foreach my $destination ( @{ $args_hr->{'to'} } ) {
|
|
foreach my $destination ( @{ $args_hr->{'to'} } ) {
|