Yuriy Zhilovets 7 жил өмнө
parent
commit
a845493ec8
1 өөрчлөгдсөн 2 нэмэгдсэн , 2 устгасан
  1. 2 2
      telegram.pl

+ 2 - 2
telegram.pl

@@ -139,7 +139,7 @@ sub notify::telegram::send
   
   foreach (@$to)
   {
-    notify($_, $body->{message});
+    notify($_, $body->{message}, $body);
   }
 }
 
@@ -259,9 +259,9 @@ sub notify
   my $params = {
     chat_id => $chatid,
     text => $message,
-    parse_mode => "Markdown",
   };
   
+  $params->{parse_mode} = "Markdown" unless $rest->{parse_mode} && $rest->{parse_mode} eq "none";
   $params->{reply_to_message_id} = $rest->{msgid} if $rest->{msgid};
   
   return request("sendMessage", $params)->catch(sub