summaryrefslogtreecommitdiff
path: root/protocols/Telegram/src/proto.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-04-29 18:46:37 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-04-29 18:46:37 +0300
commita1d4ef315aa12a409d55e694384c1c1a3fa4bcc3 (patch)
treec358e1177deccea1e71f5d13c735b7688acd147a /protocols/Telegram/src/proto.cpp
parente4d69943332fdf15ecbbe3ea7e593a3119869827 (diff)
fixes #3330 (support for pictures, videos, voice messages in Telegram)
Diffstat (limited to 'protocols/Telegram/src/proto.cpp')
-rw-r--r--protocols/Telegram/src/proto.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/protocols/Telegram/src/proto.cpp b/protocols/Telegram/src/proto.cpp
index a8f36fbe2e..a32e1571b3 100644
--- a/protocols/Telegram/src/proto.cpp
+++ b/protocols/Telegram/src/proto.cpp
@@ -280,6 +280,21 @@ INT_PTR CTelegramProto::GetCaps(int type, MCONTACT)
/////////////////////////////////////////////////////////////////////////////////////////
+MEVENT CTelegramProto::RecvFile(MCONTACT hContact, PROTORECVFILE *pre)
+{
+ MEVENT hEvent = CSuper::RecvFile(hContact, pre);
+ if (hEvent)
+ if (auto *ft = (TG_FILE_REQUEST *)pre->lParam) {
+ DBVARIANT dbv = { DBVT_DWORD };
+ dbv.dVal = ft->m_type;
+ db_event_setJson(hEvent, "t", &dbv);
+ }
+
+ return hEvent;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
void CTelegramProto::OnSearchResults(td::ClientManager::Response &response)
{
m_searchIds.clear();