summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-07-26 13:32:45 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-07-26 13:32:45 +0300
commit935b5ac6522e20beeb27649574bba1c8cf4511fe (patch)
tree14118058a31824c52215344082ca52ab30f163dc /protocols
parentb05abc26fef6128e2327990ff9fb76e5156ca5d7 (diff)
ICQ: display outgoing file transfers as offline files, if a history is dowloaded from server
Diffstat (limited to 'protocols')
-rw-r--r--protocols/ICQ-WIM/src/server.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp
index 588cacaca1..8c58ed0c80 100644
--- a/protocols/ICQ-WIM/src/server.cpp
+++ b/protocols/ICQ-WIM/src/server.cpp
@@ -534,9 +534,10 @@ void CIcqProto::ParseMessage(MCONTACT hContact, __int64 &lastMsgId, const JSONNo
}
bool bIsOutgoing = it["outgoing"].as_bool();
+ bool bIsChat = Contact::IsGroupChat(hContact);
IcqFileInfo *pFileInfo = nullptr;
- if (!bIsOutgoing && wszText.Left(26) == L"https://files.icq.net/get/") {
+ if (wszText.Left(26) == L"https://files.icq.net/get/") {
if (!CheckFile(hContact, wszText, pFileInfo)) {
debugLogA("Some shit happened, report this case to developers");
return;
@@ -553,11 +554,11 @@ void CIcqProto::ParseMessage(MCONTACT hContact, __int64 &lastMsgId, const JSONNo
CMStringA reqId(it["reqId"].as_mstring());
if (CheckOwnMessage(reqId, szMsgId, true)) {
debugLogA("Skipping our own message %s", szMsgId.c_str());
- if (!Contact::IsGroupChat(hContact)) // prevent duplicates in private chats
+ if (!bIsChat) // prevent duplicates in private chats
return;
bIsOutgoing = bCreateRead = true;
}
- else if (Contact::IsGroupChat(hContact))
+ else if (bIsChat)
bCreateRead = true;
// convert a file info into Miranda's file transfer
@@ -579,6 +580,8 @@ void CIcqProto::ParseMessage(MCONTACT hContact, __int64 &lastMsgId, const JSONNo
pre.lParam = (LPARAM)pFileInfo;
if (bCreateRead)
pre.dwFlags |= PRFF_READ;
+ if (bIsOutgoing)
+ pre.dwFlags |= PRFF_SENT;
if (isChatRoom(hContact))
pre.szUserId = szSender;
ProtoChainRecvFile(hContact, &pre);