@@ -698,7 +698,7 @@ String UniversalTelegramBot::sendPhoto(const String& chat_id, const String& phot
698
698
payload[" chat_id" ] = chat_id;
699
699
payload[" photo" ] = photo;
700
700
701
- if (! caption.isEmpty () )
701
+ if (caption.length () > 0 )
702
702
payload[" caption" ] = caption;
703
703
704
704
if (disable_notification)
@@ -707,7 +707,7 @@ String UniversalTelegramBot::sendPhoto(const String& chat_id, const String& phot
707
707
if (reply_to_message_id && reply_to_message_id != 0 )
708
708
payload[" reply_to_message_id" ] = reply_to_message_id;
709
709
710
- if (!keyboard.isEmpty () ) {
710
+ if (!keyboard.length () > 0 ) {
711
711
JsonObject replyMarkup = payload.createNestedObject (" reply_markup" );
712
712
replyMarkup[" keyboard" ] = serialized (keyboard);
713
713
}
@@ -794,8 +794,8 @@ bool UniversalTelegramBot::answerCallbackQuery(const String &query_id, const Str
794
794
payload[" show_alert" ] = show_alert;
795
795
payload[" cache_time" ] = cache_time;
796
796
797
- if (! text.isEmpty () ) payload[" text" ] = text;
798
- if (! url.isEmpty () ) payload[" url" ] = url;
797
+ if (text.length () > 0 ) payload[" text" ] = text;
798
+ if (url.length () > 0 ) payload[" url" ] = url;
799
799
800
800
String response = sendPostToTelegram (BOT_CMD (" answerCallbackQuery" ), payload.as <JsonObject>());
801
801
#ifdef _debug
0 commit comments