Skip to content

Commit 0bc9aab

Browse files
committed
upd
1 parent ca4645c commit 0bc9aab

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=FastBot2
2-
version=1.2.2
2+
version=1.2.3
33
author=AlexGyver <[email protected]>
44
maintainer=AlexGyver <[email protected]>
55
sentence=Fast and universal Arduino/ESP8266/ESP32 library for Telegram bot

src/core/types/File.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class File : protected Message {
5353
void makePacket(Packet& p) const {
5454
if (multipart.isFile()) {
5555
Message::makeQS(p);
56-
if (caption.length()) p.addQS(tg_api::caption, caption);
56+
if (caption.length()) p.addQS(tg_api::caption, su::url::encode(caption));
5757
} else {
5858
Message::makePacket(p);
5959
p[multipart.getType()] = multipart.getUrlid();

src/core/types/Message.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ class Message {
139139

140140
void makeQS(Packet& p) const {
141141
p.addQS(tg_api::chat_id, chatID);
142-
if (text.length()) p.addQS(tg_api::text, text);
142+
if (text.length()) p.addQS(tg_api::text, su::url::encode(text));
143143
if (threadID >= 0) p.addQS(tg_api::message_thread_id, threadID);
144144
if (reply.messageID >= 0) {
145145
p.beginQS(tg_api::reply_parameters);

0 commit comments

Comments
 (0)