Skip to content

Commit 56e92ce

Browse files
author
Pascal Guenther
committed
Fix a bug where the caption of a sent photo could not be empty
1 parent 99f6e4b commit 56e92ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/UniversalTelegramBot.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ String UniversalTelegramBot::sendPhoto(String chat_id, String photo,
685685
payload["chat_id"] = chat_id;
686686
payload["photo"] = photo;
687687

688-
if (caption)
688+
if (!caption.isEmpty())
689689
payload["caption"] = caption;
690690

691691
if (disable_notification)

0 commit comments

Comments
 (0)