summaryrefslogtreecommitdiff
path: root/protocols/ICQ-WIM
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-03-12 20:36:48 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-03-12 20:36:48 +0300
commitb3577d87299038380a0e7d309801afc78cba1987 (patch)
tree27d399c7913b35b4713b11e136863c425913ee23 /protocols/ICQ-WIM
parent80bf10f230ee9450b6e5fc207120e85a50771f54 (diff)
fixes #3419 (ICQ: в журнале групчата не видны исходящие реплики)
Diffstat (limited to 'protocols/ICQ-WIM')
-rw-r--r--protocols/ICQ-WIM/src/server.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp
index 6780daad1e..918ee2d119 100644
--- a/protocols/ICQ-WIM/src/server.cpp
+++ b/protocols/ICQ-WIM/src/server.cpp
@@ -73,9 +73,11 @@ MCONTACT CIcqProto::CheckOwnMessage(const CMStringA &reqId, const CMStringA &msg
if (pOwn == nullptr)
return 0;
- ProtoBroadcastAck(pOwn->m_hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE)pOwn->m_msgid, (LPARAM)msgId.c_str());
-
MCONTACT ret = pOwn->m_hContact;
+
+ if (!Contact::IsGroupChat(ret))
+ ProtoBroadcastAck(ret, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE)pOwn->m_msgid, (LPARAM)msgId.c_str());
+
if (bRemove) {
mir_cslock lck(m_csOwnIds);
m_arOwnIds.remove(pOwn);
@@ -471,12 +473,16 @@ void CIcqProto::ParseMessage(MCONTACT hContact, __int64 &lastMsgId, const JSONNo
}
}
- // skip own messages, just set the server msgid
+ // process our own messages
CMStringA reqId(it["reqId"].as_mstring());
if (CheckOwnMessage(reqId, szMsgId, true)) {
debugLogA("Skipping our own message %s", szMsgId.c_str());
- return;
+ if (!Contact::IsGroupChat(hContact)) // prevent duplicates in private chats
+ return;
+ bIsOutgoing = bCreateRead = true;
}
+ else if (Contact::IsGroupChat(hContact))
+ bCreateRead = true;
// ignore duplicates
MEVENT hDbEvent = db_event_getById(m_szModuleName, szMsgId);