summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp/src/chat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/WhatsApp/src/chat.cpp')
-rw-r--r--protocols/WhatsApp/src/chat.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/protocols/WhatsApp/src/chat.cpp b/protocols/WhatsApp/src/chat.cpp
index c34f9e8e1b..f5d1545c04 100644
--- a/protocols/WhatsApp/src/chat.cpp
+++ b/protocols/WhatsApp/src/chat.cpp
@@ -327,6 +327,12 @@ void WhatsAppProto::onGroupInfo(const std::string &jid, const std::string &owner
void WhatsAppProto::onGroupMessage(const FMessage &pMsg)
{
+ // we need to add a contact, so there's no difference at all
+ if (pMsg.media_wa_type == FMessage::WA_TYPE_CONTACT) {
+ onMessageForMe(pMsg);
+ return;
+ }
+
WAChatInfo *pInfo = SafeGetChat(pMsg.key.remote_jid);
if (pInfo == NULL) {
pInfo = InitChat(pMsg.key.remote_jid, "");