shurillu / CTBot

A simple (and easy to use) Arduino Telegram BOT Library for ESP8266/ESP32
MIT License
150 stars 34 forks source link

from Groups #30

Closed Sergio-Soria closed 5 years ago

Sergio-Soria commented 5 years ago

Hello Stefano, I suggest an improvement, for when messages arrive from groups. It would be necessary to define a new structure: typedef struct TBGroup { long id; String title; }; Add a field in TBMessage: TBGroup group; and Add these lines to ... if (root ["result"] [0] ["message"] ["message_id"]! = 0) {..... message.group.id = root ["result"] [0] ["message"] ["chat"] ["id"]; message.group.title = root ["result"] [0] ["message"] ["chat"] ["title"]. asString ();

Regards.

shurillu commented 5 years ago

Hello Sergio, good point, just added in the 1.3.2 release (soon available in the Arduino Library Manager).

Thanks!

Stefano