File tree Expand file tree Collapse file tree 6 files changed +10
-10
lines changed Expand file tree Collapse file tree 6 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 1
1
name =FastBot2
2
- version =1.0.13
2
+ version =1.0.14
3
3
author =AlexGyver <
[email protected] >
4
4
maintainer =AlexGyver <
[email protected] >
5
5
sentence =Fast and universal Arduino/ESP8266/ESP32 library for Telegram bot
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ class FastBot2Client : public fb::Core {
50
50
}
51
51
52
52
// ============================== FILE ==============================
53
- #if !defined(FB_NO_FILE) && defined(ESP8266) && defined(ESP32)
53
+ #if !defined(FB_NO_FILE) && ( defined(ESP8266) || defined(ESP32) )
54
54
// отправить файл, тип указывается в fb::File
55
55
fb::Result sendFile (const fb::File& m, bool wait = true ) {
56
56
fb::Packet p (m.multipart , _token);
Original file line number Diff line number Diff line change 10
10
#include < FS.h>
11
11
#endif
12
12
13
- #if !defined(FB_NO_FILE) && defined(ESP8266) && defined(ESP32)
13
+ #if !defined(FB_NO_FILE) && ( defined(ESP8266) || defined(ESP32) )
14
14
#define FB_ATTACH " attach://"
15
15
16
16
namespace fb {
Original file line number Diff line number Diff line change @@ -219,7 +219,7 @@ class Core : public Http {
219
219
if (!_state) return 0 ;
220
220
221
221
// OTA
222
- #if !defined(FB_NO_FILE) && defined(ESP8266) && defined(ESP32)
222
+ #if !defined(FB_NO_FILE) && ( defined(ESP8266) || defined(ESP32) )
223
223
if (_ota != ota_t ::None) {
224
224
if (_ota_id.length ()) {
225
225
fb::Fetcher fetch = downloadFile (_ota_id);
@@ -385,7 +385,7 @@ class Core : public Http {
385
385
return link;
386
386
}
387
387
388
- #if !defined(FB_NO_FILE) && defined(ESP8266) && defined(ESP32)
388
+ #if !defined(FB_NO_FILE) && ( defined(ESP8266) || defined(ESP32) )
389
389
// скачать файл по id
390
390
fb::Fetcher downloadFile (Text fileID) {
391
391
FB_ESP_YIELD ();
@@ -426,7 +426,7 @@ class Core : public Http {
426
426
CallbackRaw _cbRaw = nullptr ;
427
427
CallbackError _cbErr = nullptr ;
428
428
429
- #if !defined(FB_NO_FILE) && defined(ESP8266) && defined(ESP32)
429
+ #if !defined(FB_NO_FILE) && ( defined(ESP8266) || defined(ESP32) )
430
430
ota_t _ota = ota_t ::None;
431
431
String _ota_id;
432
432
String _ota_user;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ class Packet : public gson::string {
19
19
public:
20
20
Packet () : gson::string(200 ) {}
21
21
22
- #if !defined(FB_NO_FILE) && defined(ESP8266) && defined(ESP32)
22
+ #if !defined(FB_NO_FILE) && ( defined(ESP8266) || defined(ESP32) )
23
23
// отправка файла через multipart/form-data
24
24
Packet (const Multipart& multipart, const String& token) : gson::string(200 ) {
25
25
this ->multipart = &multipart;
@@ -88,7 +88,7 @@ class Packet : public gson::string {
88
88
// print
89
89
void printTo (Print& p) {
90
90
switch (_type) {
91
- #if !defined(FB_NO_FILE) && defined(ESP8266) && defined(ESP32)
91
+ #if !defined(FB_NO_FILE) && ( defined(ESP8266) || defined(ESP32) )
92
92
case Type::File: {
93
93
Text formName = multipart->getFormName ();
94
94
Text fileName = multipart->getFileName ();
@@ -148,7 +148,7 @@ class Packet : public gson::string {
148
148
}
149
149
}
150
150
151
- #if !defined(FB_NO_FILE) && defined(ESP8266) && defined(ESP32)
151
+ #if !defined(FB_NO_FILE) && ( defined(ESP8266) || defined(ESP32) )
152
152
const Multipart* multipart = nullptr ;
153
153
#endif
154
154
Original file line number Diff line number Diff line change 6
6
#include " Message.h"
7
7
#include " ../Multipart.h"
8
8
9
- #if !defined(FB_NO_FILE) && defined(ESP8266) && defined(ESP32)
9
+ #if !defined(FB_NO_FILE) && ( defined(ESP8266) || defined(ESP32) )
10
10
namespace fb {
11
11
12
12
class File : protected Message {
You can’t perform that action at this time.
0 commit comments