summaryrefslogtreecommitdiff
path: root/protocols/Telegram/src/proto.h
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Telegram/src/proto.h')
-rw-r--r--protocols/Telegram/src/proto.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/protocols/Telegram/src/proto.h b/protocols/Telegram/src/proto.h
index a917ed4457..786883aaa3 100644
--- a/protocols/Telegram/src/proto.h
+++ b/protocols/Telegram/src/proto.h
@@ -281,7 +281,21 @@ class CTelegramProto : public PROTO<CTelegramProto>
void UnregisterSession();
- bool GetMessageFile(TG_FILE_REQUEST::Type, TG_USER *pUser, const TD::file *pFile, const char *pszFileName, const std::string &caption, const char *szId, const char *szUser, const TD::message *pMsg, bool bRead);
+ struct EmbeddedFile
+ {
+ EmbeddedFile(CMStringA &_1) :
+ szBody(_1)
+ {}
+
+ CMStringA &szBody;
+ const TG_USER *pUser;
+ const char *pszId, *pszUser;
+ const TD::message *pMsg;
+ bool bRead;
+ };
+
+ bool GetMessageFile(const EmbeddedFile &embed, TG_FILE_REQUEST::Type, const TD::file *pFile, const char *pszFileName, const char *pszCaption);
+
CMStringA GetMessagePreview(const TD::file *pFile);
CMStringA GetMessageSticker(const TD::file *pFile, const char *pwszExtension);
CMStringA GetMessageText(TG_USER *pUser, const TD::message *pMsg, bool bSkipJoin = false, bool bRead = false);