Skip to content

Commit 6950785

Browse files
committed
Removing isEmpty as it was not compiling on my mac
1 parent 722eaa7 commit 6950785

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/UniversalTelegramBot.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ String UniversalTelegramBot::sendPhoto(const String& chat_id, const String& phot
698698
payload["chat_id"] = chat_id;
699699
payload["photo"] = photo;
700700

701-
if (!caption.isEmpty())
701+
if (caption.length() > 0)
702702
payload["caption"] = caption;
703703

704704
if (disable_notification)
@@ -707,7 +707,7 @@ String UniversalTelegramBot::sendPhoto(const String& chat_id, const String& phot
707707
if (reply_to_message_id && reply_to_message_id != 0)
708708
payload["reply_to_message_id"] = reply_to_message_id;
709709

710-
if (!keyboard.isEmpty()) {
710+
if (!keyboard.length() > 0) {
711711
JsonObject replyMarkup = payload.createNestedObject("reply_markup");
712712
replyMarkup["keyboard"] = serialized(keyboard);
713713
}
@@ -794,8 +794,8 @@ bool UniversalTelegramBot::answerCallbackQuery(const String &query_id, const Str
794794
payload["show_alert"] = show_alert;
795795
payload["cache_time"] = cache_time;
796796

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;
799799

800800
String response = sendPostToTelegram(BOT_CMD("answerCallbackQuery"), payload.as<JsonObject>());
801801
#ifdef _debug

0 commit comments

Comments
 (0)