Skip to content

Commit 254bc2f

Browse files
committed
upd
1 parent 72a1a16 commit 254bc2f

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
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.0.13
2+
version=1.0.14
33
author=AlexGyver <[email protected]>
44
maintainer=AlexGyver <[email protected]>
55
sentence=Fast and universal Arduino/ESP8266/ESP32 library for Telegram bot

src/FastBot2Client.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class FastBot2Client : public fb::Core {
5050
}
5151

5252
// ============================== FILE ==============================
53-
#if !defined(FB_NO_FILE) && defined(ESP8266) && defined(ESP32)
53+
#if !defined(FB_NO_FILE) && (defined(ESP8266) || defined(ESP32))
5454
// отправить файл, тип указывается в fb::File
5555
fb::Result sendFile(const fb::File& m, bool wait = true) {
5656
fb::Packet p(m.multipart, _token);

src/core/Multipart.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <FS.h>
1111
#endif
1212

13-
#if !defined(FB_NO_FILE) && defined(ESP8266) && defined(ESP32)
13+
#if !defined(FB_NO_FILE) && (defined(ESP8266) || defined(ESP32))
1414
#define FB_ATTACH "attach://"
1515

1616
namespace fb {

src/core/core.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ class Core : public Http {
219219
if (!_state) return 0;
220220

221221
// OTA
222-
#if !defined(FB_NO_FILE) && defined(ESP8266) && defined(ESP32)
222+
#if !defined(FB_NO_FILE) && (defined(ESP8266) || defined(ESP32))
223223
if (_ota != ota_t::None) {
224224
if (_ota_id.length()) {
225225
fb::Fetcher fetch = downloadFile(_ota_id);
@@ -385,7 +385,7 @@ class Core : public Http {
385385
return link;
386386
}
387387

388-
#if !defined(FB_NO_FILE) && defined(ESP8266) && defined(ESP32)
388+
#if !defined(FB_NO_FILE) && (defined(ESP8266) || defined(ESP32))
389389
// скачать файл по id
390390
fb::Fetcher downloadFile(Text fileID) {
391391
FB_ESP_YIELD();
@@ -426,7 +426,7 @@ class Core : public Http {
426426
CallbackRaw _cbRaw = nullptr;
427427
CallbackError _cbErr = nullptr;
428428

429-
#if !defined(FB_NO_FILE) && defined(ESP8266) && defined(ESP32)
429+
#if !defined(FB_NO_FILE) && (defined(ESP8266) || defined(ESP32))
430430
ota_t _ota = ota_t::None;
431431
String _ota_id;
432432
String _ota_user;

src/core/packet.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class Packet : public gson::string {
1919
public:
2020
Packet() : gson::string(200) {}
2121

22-
#if !defined(FB_NO_FILE) && defined(ESP8266) && defined(ESP32)
22+
#if !defined(FB_NO_FILE) && (defined(ESP8266) || defined(ESP32))
2323
// отправка файла через multipart/form-data
2424
Packet(const Multipart& multipart, const String& token) : gson::string(200) {
2525
this->multipart = &multipart;
@@ -88,7 +88,7 @@ class Packet : public gson::string {
8888
// print
8989
void printTo(Print& p) {
9090
switch (_type) {
91-
#if !defined(FB_NO_FILE) && defined(ESP8266) && defined(ESP32)
91+
#if !defined(FB_NO_FILE) && (defined(ESP8266) || defined(ESP32))
9292
case Type::File: {
9393
Text formName = multipart->getFormName();
9494
Text fileName = multipart->getFileName();
@@ -148,7 +148,7 @@ class Packet : public gson::string {
148148
}
149149
}
150150

151-
#if !defined(FB_NO_FILE) && defined(ESP8266) && defined(ESP32)
151+
#if !defined(FB_NO_FILE) && (defined(ESP8266) || defined(ESP32))
152152
const Multipart* multipart = nullptr;
153153
#endif
154154

src/core/types/File.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include "Message.h"
77
#include "../Multipart.h"
88

9-
#if !defined(FB_NO_FILE) && defined(ESP8266) && defined(ESP32)
9+
#if !defined(FB_NO_FILE) && (defined(ESP8266) || defined(ESP32))
1010
namespace fb {
1111

1212
class File : protected Message {

0 commit comments

Comments
 (0)