From 2704f1deabc2fc0f0d8a59afbe5a63847d2ba8bd Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 15 Jun 2013 18:26:30 +0000 Subject: ProtoBroadcastAck - unified helper for all protocols git-svn-id: http://svn.miranda-ng.org/main/trunk@4963 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/WhatsApp/src/messages.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'protocols/WhatsApp/src/messages.cpp') diff --git a/protocols/WhatsApp/src/messages.cpp b/protocols/WhatsApp/src/messages.cpp index c05e19de83..d45d3ec2d9 100644 --- a/protocols/WhatsApp/src/messages.cpp +++ b/protocols/WhatsApp/src/messages.cpp @@ -62,7 +62,7 @@ void WhatsAppProto::SendMsgWorker(void* p) db_get_b(data->hContact, m_szModuleName, "IsGroupMember", 0) == 0) { LOG("not a group member"); - ProtoBroadcastAck(m_szModuleName,data->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, + ProtoBroadcastAck(data->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE) (this->msgIdHeader + this->msgId), (LPARAM) "You cannot send messages to groups if you are not a member."); } else if (!db_get_s(data->hContact, m_szModuleName,"ID", &dbv, DBVT_ASCIIZ) && @@ -88,20 +88,20 @@ void WhatsAppProto::SendMsgWorker(void* p) catch (exception &e) { LOG("exception: %s", e.what()); - ProtoBroadcastAck(m_szModuleName,data->hContact,ACKTYPE_MESSAGE,ACKRESULT_FAILED, + ProtoBroadcastAck(data->hContact,ACKTYPE_MESSAGE,ACKRESULT_FAILED, (HANDLE) (this->msgIdHeader + this->msgId), (LPARAM) e.what()); } catch (...) { LOG("unknown exception"); - ProtoBroadcastAck(m_szModuleName,data->hContact,ACKTYPE_MESSAGE,ACKRESULT_FAILED, + ProtoBroadcastAck(data->hContact,ACKTYPE_MESSAGE,ACKRESULT_FAILED, (HANDLE) (this->msgIdHeader + this->msgId), (LPARAM) "Failed sending message"); } } else { LOG("No connection"); - ProtoBroadcastAck(m_szModuleName,data->hContact,ACKTYPE_MESSAGE,ACKRESULT_FAILED, + ProtoBroadcastAck(data->hContact,ACKTYPE_MESSAGE,ACKRESULT_FAILED, (HANDLE) (this->msgIdHeader + this->msgId), (LPARAM) "You cannot send messages when you are offline."); } @@ -189,7 +189,7 @@ void WhatsAppProto::onMessageStatusUpdate(FMessage* fmsg) ss >> id; if (state == 1) - ProtoBroadcastAck(m_szModuleName, hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE) (header + id),0); + ProtoBroadcastAck(hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE) (header + id),0); if (db_get_dw(hContact, m_szModuleName, WHATSAPP_KEY_LAST_MSG_ID_HEADER, 0) == header && db_get_dw(hContact, m_szModuleName, WHATSAPP_KEY_LAST_MSG_ID, -1) == id) -- cgit v1.2.3