Userid and chatid must be strings in order to work with chats components other than Telegram

This commit is contained in:
eleksir
2022-04-22 14:58:26 +03:00
parent 27b9a4bcbd
commit 221314ae16

View File

@@ -254,8 +254,8 @@ my $parse_message = sub {
$self->json ($send_to)->notify ( $self->json ($send_to)->notify (
$send_to => { $send_to => {
from => 'craniac', from => 'craniac',
userid => 0 + $userid, userid => "$userid",
chatid => 0 + $chatid, chatid => "$chatid",
plugin => $m->{plugin}, plugin => $m->{plugin},
message => $reply, message => $reply,
}, },
@@ -299,8 +299,8 @@ my $parse_message = sub {
$self->json ($send_to)->notify ( $self->json ($send_to)->notify (
$send_to => { $send_to => {
from => 'craniac', from => 'craniac',
userid => 0 + $userid, userid => "$userid",
chatid => 0 + $chatid, chatid => "$chatid",
plugin => $m->{plugin}, plugin => $m->{plugin},
message => $reply, message => $reply,
}, },
@@ -324,8 +324,8 @@ my $parse_message = sub {
$self->json ($send_to)->notify ( $self->json ($send_to)->notify (
$send_to => { $send_to => {
from => 'craniac', from => 'craniac',
userid => 0 + $userid, userid => "$userid",
chatid => 0 + $chatid, chatid => "$chatid",
plugin => $m->{plugin}, plugin => $m->{plugin},
message => $reply, message => $reply,
}, },
@@ -367,8 +367,8 @@ my $parse_message = sub {
$self->json ($send_to)->notify ( $self->json ($send_to)->notify (
$send_to => { $send_to => {
from => 'craniac', from => 'craniac',
userid => 0 + $userid, userid => "$userid",
chatid => 0 + $chatid, chatid => "$chatid",
plugin => $m->{plugin}, plugin => $m->{plugin},
message => $reply, message => $reply,
}, },