diff options
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) {
|