summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-10-18 13:55:24 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-10-18 13:55:24 +0300
commitea162a6fdb1d7a1c4f11b8e8529391a7bee56730 (patch)
treefb6cc999bd0388d218f85945b799133c03cde6e3
parent7eb8c60ca91ed6932f508df9447c981e30bddbcd (diff)
fixes #4738 (Предпросмотр файлов сохраняется в профиль даже у канала, где приём сообщений и файлов заигнорен)
-rw-r--r--protocols/Telegram/src/stdafx.h1
-rw-r--r--protocols/Telegram/src/utils.cpp10
2 files changed, 7 insertions, 4 deletions
diff --git a/protocols/Telegram/src/stdafx.h b/protocols/Telegram/src/stdafx.h
index 8b583a6cba..ba59150fbb 100644
--- a/protocols/Telegram/src/stdafx.h
+++ b/protocols/Telegram/src/stdafx.h
@@ -22,6 +22,7 @@
#include <m_extraicons.h>
#include <m_history.h>
#include <m_icolib.h>
+#include <m_ignore.h>
#include <m_json.h>
#include <m_langpack.h>
#include <m_message.h>
diff --git a/protocols/Telegram/src/utils.cpp b/protocols/Telegram/src/utils.cpp
index b0a71e8fcb..79fce40608 100644
--- a/protocols/Telegram/src/utils.cpp
+++ b/protocols/Telegram/src/utils.cpp
@@ -480,10 +480,12 @@ bool CTelegramProto::GetMessageFile(const EmbeddedFile &F, TG_FILE_REQUEST::Type
}
if (dbei) {
- DB::FILE_BLOB blob(dbei);
- OnReceiveOfflineFile(dbei, blob);
- blob.write(dbei);
- db_event_edit(dbei.getEvent(), &dbei, true);
+ if (!Ignore_IsIgnored(pRequest->m_hContact, IGNOREEVENT_FILE)) {
+ DB::FILE_BLOB blob(dbei);
+ OnReceiveOfflineFile(dbei, blob);
+ blob.write(dbei);
+ db_event_edit(dbei.getEvent(), &dbei, true);
+ }
delete pRequest;
}
else ProtoChainRecvFile(pRequest->m_hContact, DB::FILE_BLOB(pRequest, pszFileName, F.szBody), dbei);