Browse Source

+parse_mode=none

Yuriy Zhilovets 7 years ago
parent
commit
a845493ec8
1 changed files with 2 additions and 2 deletions
  1. 2 2
      telegram.pl

+ 2 - 2
telegram.pl

@@ -139,7 +139,7 @@ sub notify::telegram::send
   
   
   foreach (@$to)
   foreach (@$to)
   {
   {
-    notify($_, $body->{message});
+    notify($_, $body->{message}, $body);
   }
   }
 }
 }
 
 
@@ -259,9 +259,9 @@ sub notify
   my $params = {
   my $params = {
     chat_id => $chatid,
     chat_id => $chatid,
     text => $message,
     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};
   $params->{reply_to_message_id} = $rest->{msgid} if $rest->{msgid};
   
   
   return request("sendMessage", $params)->catch(sub
   return request("sendMessage", $params)->catch(sub