@@ -11,7 +11,8 @@ interface
1111 TTelegramUpdateObj = class ;
1212 TTelegramMessageObj = class ;
1313 TTelegramTextQuote = class ;
14- TTelegramMessageEntityObj = class ;
14+ TTelegramExternalReplyInfo = class ;
15+ TTelegramMessageEntityObj = class ;
1516 TTelegramChatMemberUpdated = class ;
1617 TTelegramInlineQueryObj = class ;
1718 TTelegramChosenInlineResultObj = class ;
@@ -113,7 +114,8 @@ TTelegramMessageObj = class(TTelegramObj)
113114 FChat: TTelegramChatObj;
114115 FContact: TTelegramContact;
115116 FDate: Int64;
116- FDocument: TTelegramDocument;
117+ FDocument: TTelegramDocument;
118+ FExternalReply: TTelegramExternalReplyInfo;
117119 FForwardFrom: TTelegramUserObj;
118120 FForwardFromChat: TTelegramChatObj;
119121 FForwardFromMessageID: LongInt;
@@ -151,7 +153,8 @@ TTelegramMessageObj = class(TTelegramObj)
151153 property Quote: TTelegramTextQuote read FQuote;
152154 property Text: string read fText;
153155 property Entities: TTelegramUpdateObjList read fEntities;
154- property Document: TTelegramDocument read FDocument;
156+ property Document: TTelegramDocument read FDocument;
157+ property ExternalReply: TTelegramExternalReplyInfo read FExternalReply;
155158 property Location: TTelegramLocation read FLocation;
156159 property Photo: TTelegramPhotoSizeList read FPhoto;
157160 property Audio: TTelegramAudio read FAudio;
@@ -165,6 +168,13 @@ TTelegramMessageObj = class(TTelegramObj)
165168 property IsTopicMessage: Boolean read FIsTopicMessage;
166169 end ;
167170
171+ { TTelegramExternalReplyInfo }
172+
173+ TTelegramExternalReplyInfo = class (TTelegramObj)
174+ public
175+ constructor Create(JSONObject: TJSONObject); override;
176+ end ;
177+
168178 { TTelegramTextQuote }
169179
170180 TTelegramTextQuote = class (TTelegramObj)
@@ -1477,8 +1487,10 @@ constructor TTelegramMessageObj.Create(JSONObject: TJSONObject);
14771487 FChat:=TTelegramChatObj.CreateFromJSONObject(fJSON.Find(' chat' , jtObject) as TJSONObject) as TTelegramChatObj;
14781488 fChatId := fJSON.Objects[' chat' ].Int64s[' id' ]; // deprecated?
14791489 FFrom:=TTelegramUserObj.CreateFromJSONObject(fJSON.Find(' from' , jtObject) as TJSONObject) as TTelegramUserObj;
1480- FDocument := TTelegramDocument.CreateFromJSONObject(fJSON.Find(' document' , jtObject) as TJSONObject) as TTelegramDocument;
1481- FVideo := TTelegramVideo.CreateFromJSONObject(fJSON.Find(' video' , jtObject) as TJSONObject) as TTelegramVideo;
1490+ FDocument := TTelegramDocument.CreateFromJSONObject(fJSON.Find(' document' , jtObject) as TJSONObject) as TTelegramDocument;
1491+ FExternalReply := TTelegramExternalReplyInfo.CreateFromJSONObject(
1492+ fJSON.Find(' external_reply' , jtObject) as TJSONObject) as TTelegramExternalReplyInfo;
1493+ FVideo := TTelegramVideo.CreateFromJSONObject(fJSON.Find(' video' , jtObject) as TJSONObject) as TTelegramVideo;
14821494 FAudio := TTelegramAudio.CreateFromJSONObject(fJSON.Find(' audio' , jtObject) as TJSONObject) as TTelegramAudio;
14831495 FVoice := TTelegramVoice.CreateFromJSONObject(fJSON.Find(' voice' , jtObject) as TJSONObject) as TTelegramVoice;
14841496 FViaBot := TTelegramUserObj.CreateFromJSONObject(fJSON.Find(' via_bot' , jtObject) as TJSONObject) as TTelegramUserObj;
@@ -1531,14 +1543,22 @@ destructor TTelegramMessageObj.Destroy;
15311543 FReplyToMessage.Free;
15321544 FQuote.Free;
15331545 FPhoto.Free;
1534- FDocument.Free;
1535- FAudio.Free;
1546+ FDocument.Free;
1547+ FExternalReply.Free;
1548+ FAudio.Free;
15361549 FVideo.Free;
15371550 FVoice.Free;
15381551 fEntities.Free;
15391552 inherited Destroy;
15401553end ;
15411554
1555+ { TTelegramExternalReplyInfo }
1556+
1557+ constructor TTelegramExternalReplyInfo.Create(JSONObject: TJSONObject);
1558+ begin
1559+ inherited Create(JSONObject);
1560+ end ;
1561+
15421562{ TTelegramTextQuote }
15431563
15441564constructor TTelegramTextQuote.Create(JSONObject: TJSONObject);
0 commit comments