2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Update API and use WebDocument for inline bots.

This commit is contained in:
John Preston
2018-03-04 23:04:13 +03:00
parent 09aba596ac
commit 0f901b3728
18 changed files with 536 additions and 238 deletions

View File

@@ -226,6 +226,7 @@ public:
void photoConvert(
not_null<PhotoData*> original,
const MTPPhoto &data);
PhotoData *photoFromWeb(const MTPWebDocument &data, ImagePtr thumb);
not_null<DocumentData*> document(DocumentId id);
not_null<DocumentData*> document(const MTPDocument &data);
@@ -247,6 +248,9 @@ public:
void documentConvert(
not_null<DocumentData*> original,
const MTPDocument &data);
DocumentData *documentFromWeb(
const MTPWebDocument &data,
ImagePtr thumb);
not_null<WebPageData*> webpage(WebPageId id);
not_null<WebPageData*> webpage(const MTPWebPage &data);
@@ -397,6 +401,12 @@ private:
int32 dc,
int32 size,
const StorageImageLocation &thumbLocation);
DocumentData *documentFromWeb(
const MTPDwebDocument &data,
ImagePtr thumb);
DocumentData *documentFromWeb(
const MTPDwebDocumentNoProxy &data,
ImagePtr thumb);
void webpageApplyFields(
not_null<WebPageData*> page,