diff options
author | George Hazan <ghazan@miranda.im> | 2018-10-01 15:36:26 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-10-01 15:36:26 +0300 |
commit | e808179197e8875f3faa85ad8f0d1e75d756716f (patch) | |
tree | 6ca118531ebf3d2d85a0123171298e74b2decbd6 /protocols/JabberG | |
parent | 966214ad3db583c8e8cbfbae4281705f73df4429 (diff) |
centralized system of processing message ids. also fixes #1375
Diffstat (limited to 'protocols/JabberG')
-rwxr-xr-x | protocols/JabberG/src/jabber_omemo.cpp | 4 | ||||
-rwxr-xr-x | protocols/JabberG/src/jabber_proto.cpp | 11 | ||||
-rwxr-xr-x | protocols/JabberG/src/jabber_proto.h | 2 | ||||
-rwxr-xr-x | protocols/JabberG/src/jabber_thread.cpp | 3 |
4 files changed, 2 insertions, 18 deletions
diff --git a/protocols/JabberG/src/jabber_omemo.cpp b/protocols/JabberG/src/jabber_omemo.cpp index f52b0340fc..186cd5c2e9 100755 --- a/protocols/JabberG/src/jabber_omemo.cpp +++ b/protocols/JabberG/src/jabber_omemo.cpp @@ -1875,11 +1875,9 @@ bool CJabberProto::OmemoHandleMessage(HXML node, wchar_t *jid, time_t msgTime) if (m_bFixIncorrectTimestamps && (msgTime > now || (msgTime < (time_t)JabberGetLastContactMessageTime(hContact))))
msgTime = now;
- pResourceStatus pFromResource(ResourceInfoFromJID(jid));
- PROTORECVEVENT recv = { 0 };
+ PROTORECVEVENT recv = {};
recv.timestamp = (DWORD)msgTime;
recv.szMessage = mir_strdup(out);
- recv.lParam = (LPARAM)((pFromResource != nullptr && m_bEnableRemoteControl) ? pFromResource->m_tszResourceName : 0);
ProtoChainRecvMsg(hContact, &recv);
mir_free(out);
return true;
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index 48575d97d9..7a29dc6e91 100755 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -805,17 +805,6 @@ HANDLE CJabberProto::SearchByName(const wchar_t *nick, const wchar_t *firstName, }
////////////////////////////////////////////////////////////////////////////////////////
-// RecvMsg
-
-MEVENT CJabberProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT *evt)
-{
- MEVENT hDbEvent = CSuper::RecvMsg(hContact, evt);
- if (hDbEvent != 0 && evt->lParam)
- db_event_setId(m_szModuleName, hDbEvent, T2Utf((const wchar_t *)evt->lParam));
- return hDbEvent;
-}
-
-////////////////////////////////////////////////////////////////////////////////////////
// SendContacts
int CJabberProto::SendContacts(MCONTACT hContact, int, int nContacts, MCONTACT *hContactsList)
diff --git a/protocols/JabberG/src/jabber_proto.h b/protocols/JabberG/src/jabber_proto.h index 6bd4a2d6da..38ba232fbc 100755 --- a/protocols/JabberG/src/jabber_proto.h +++ b/protocols/JabberG/src/jabber_proto.h @@ -96,8 +96,6 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface HWND SearchAdvanced(HWND owner) override;
HWND CreateExtendedSearchUI(HWND owner) override;
- MEVENT RecvMsg(MCONTACT hContact, PROTORECVEVENT*) override;
-
int SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList) override;
HANDLE SendFile(MCONTACT hContact, const wchar_t *szDescription, wchar_t **ppszFiles) override;
int SendMsg(MCONTACT hContact, int flags, const char *msg) override;
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index 6ad324838b..3246229ff4 100755 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -1496,7 +1496,7 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) if (m_bFixIncorrectTimestamps && (msgTime > now || (msgTime < (time_t)JabberGetLastContactMessageTime(hContact))))
msgTime = now;
- PROTORECVEVENT recv = { 0 };
+ PROTORECVEVENT recv = {};
if (carbon) {
recv.flags |= PREF_CREATEREAD;
if (carbonSent)
@@ -1504,7 +1504,6 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) }
recv.timestamp = (DWORD)msgTime;
recv.szMessage = buf;
- recv.lParam = (LPARAM)((pFromResource != nullptr && m_bEnableRemoteControl) ? pFromResource->m_tszResourceName : 0);
ProtoChainRecvMsg(hContact, &recv);
}
|