update: fix telegram message format

This commit is contained in:
tokumeikoi 2022-01-27 14:56:44 +08:00
parent ca9d7df3b5
commit e363666b89

View File

@ -66,7 +66,7 @@ class TelegramController extends Controller
$obj->message_type = !isset($data['message']['reply_to_message']['text']) ? 'message' : 'reply_message';
$obj->text = $data['message']['text'];
$obj->is_private = $data['message']['chat']['type'] === 'private';
if ($obj->message_type === 'reply') {
if ($obj->message_type === 'reply_message') {
$obj->reply_text = $data['message']['reply_to_message']['text'];
}
return $obj;