@@ -62,7 +62,7 @@ String UniversalTelegramBot::buildCommand(const String& cmd) {
62
62
}
63
63
64
64
String UniversalTelegramBot::sendGetToTelegram (const String& command) {
65
- String mess = " " ;
65
+ String mess;
66
66
long now;
67
67
bool avail;
68
68
@@ -94,7 +94,7 @@ String UniversalTelegramBot::sendGetToTelegram(const String& command) {
94
94
while (client->available ()) {
95
95
char c = client->read ();
96
96
if (ch_count < maxMessageLength) {
97
- mess = mess + c;
97
+ mess += c;
98
98
ch_count++;
99
99
}
100
100
avail = true ;
@@ -115,8 +115,8 @@ String UniversalTelegramBot::sendGetToTelegram(const String& command) {
115
115
116
116
String UniversalTelegramBot::sendPostToTelegram (const String& command, JsonObject payload) {
117
117
118
- String body = " " ;
119
- String headers = " " ;
118
+ String body;
119
+ String headers;
120
120
long now;
121
121
bool responseReceived = false ;
122
122
@@ -166,11 +166,11 @@ String UniversalTelegramBot::sendPostToTelegram(const String& command, JsonObjec
166
166
if (currentLineIsBlank && c == ' \n ' ) {
167
167
finishedHeaders = true ;
168
168
} else {
169
- headers = headers + c;
169
+ headers += c;
170
170
}
171
171
} else {
172
172
if (ch_count < maxMessageLength) {
173
- body = body + c;
173
+ body += c;
174
174
ch_count++;
175
175
}
176
176
}
@@ -202,8 +202,8 @@ String UniversalTelegramBot::sendMultipartFormDataToTelegram(
202
202
GetNextBuffer getNextBufferCallback,
203
203
GetNextBufferLen getNextBufferLenCallback) {
204
204
205
- String body = " " ;
206
- String headers = " " ;
205
+ String body;
206
+ String headers;
207
207
long now;
208
208
bool responseReceived = false ;
209
209
bool finishedHeaders = false ;
@@ -320,11 +320,11 @@ String UniversalTelegramBot::sendMultipartFormDataToTelegram(
320
320
if (currentLineIsBlank && c == ' \n ' ) {
321
321
finishedHeaders = true ;
322
322
} else {
323
- headers = headers + c;
323
+ headers += c;
324
324
}
325
325
} else {
326
326
if (ch_count < maxMessageLength) {
327
- body = body + c;
327
+ body += c;
328
328
ch_count++;
329
329
}
330
330
}
0 commit comments