diff options
author | George Hazan <ghazan@miranda.im> | 2023-02-09 18:22:05 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-02-09 18:22:12 +0300 |
commit | b7718450b0856447bb7098f73d674fbd54c16e2d (patch) | |
tree | 4863436fb5574f501b92b465ae598dc0d18ec9a3 /protocols/WhatsApp | |
parent | 5ef0585dbd3bfbc09093bc8f24f41e4ae2349c59 (diff) |
database support for new protocols
Diffstat (limited to 'protocols/WhatsApp')
-rw-r--r-- | protocols/WhatsApp/src/appsync.cpp | 15 | ||||
-rw-r--r-- | protocols/WhatsApp/src/message.cpp | 12 |
2 files changed, 4 insertions, 23 deletions
diff --git a/protocols/WhatsApp/src/appsync.cpp b/protocols/WhatsApp/src/appsync.cpp index 3d812be370..cc9b4c03c6 100644 --- a/protocols/WhatsApp/src/appsync.cpp +++ b/protocols/WhatsApp/src/appsync.cpp @@ -281,20 +281,9 @@ void WhatsAppProto::ProcessHistorySync(const Wa__HistorySync *pSync) pre.flags = PREF_CREATEREAD;
if (key->fromme)
pre.flags |= PREF_SENT;
+ if (pUser->bIsGroupChat)
+ pre.szUserId = key->participant;
ProtoChainRecvMsg(pUser->hContact, &pre);
-
- if (pUser->bIsGroupChat) {
- if (pChat->name)
- setUString(pUser->hContact, "Nick", pChat->name);
-
- GCEVENT gce = { pUser->si, GC_EVENT_MESSAGE };
- gce.dwFlags = GCEF_UTF8;
- gce.pszUID.a = key->participant;
- gce.bIsMe = key->fromme;
- gce.pszText.a = szMessageText.GetBuffer();
- gce.time = pMessage->message->messagetimestamp;
- Chat_Event(&gce);
- }
}
}
}
diff --git a/protocols/WhatsApp/src/message.cpp b/protocols/WhatsApp/src/message.cpp index c0efdd3ea1..93420d8f33 100644 --- a/protocols/WhatsApp/src/message.cpp +++ b/protocols/WhatsApp/src/message.cpp @@ -220,17 +220,9 @@ void WhatsAppProto::ProcessMessage(WAMSG type, const Wa__WebMessageInfo &msg) pre.flags |= PREF_CREATEREAD;
if (key->fromme)
pre.flags |= PREF_SENT;
+ if (pUser->bIsGroupChat)
+ pre.szUserId = participant;
ProtoChainRecvMsg(pUser->hContact, &pre);
-
- if (pUser->bIsGroupChat) {
- GCEVENT gce = { pUser->si, GC_EVENT_MESSAGE };
- gce.dwFlags = GCEF_UTF8;
- gce.pszUID.a = participant;
- gce.bIsMe = key->fromme;
- gce.pszText.a = szMessageText.GetBuffer();
- gce.time = timestamp;
- Chat_Event(&gce);
- }
}
// translate statuses into status messages
else if (type.bOtherStatus || type.bDirectStatus || type.bPeerBroadcast || type.bOtherBroadcast) {
|