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 ();
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.