summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-04-06 16:48:01 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-04-06 16:48:01 +0000
commit993f6a525a2236ed3a3b1491213150c4a893426c (patch)
treece073fd63e853ef8a0e7d05ec1ca4223170d1d2d /protocols/SkypeWeb/src
parent8ae92af56cc1d9a7337d34b0a542e8ccb93966c7 (diff)
SkypeWeb: Minor optimization.
git-svn-id: http://svn.miranda-ng.org/main/trunk@12637 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src')
-rw-r--r--protocols/SkypeWeb/src/skype_messages.cpp5
-rw-r--r--protocols/SkypeWeb/src/skype_proto.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp
index 6debc0257e..1bcfb26049 100644
--- a/protocols/SkypeWeb/src/skype_messages.cpp
+++ b/protocols/SkypeWeb/src/skype_messages.cpp
@@ -45,8 +45,9 @@ MEVENT CSkypeProto::AddMessageToDb(MCONTACT hContact, DWORD timestamp, DWORD fla
/* MESSAGE RECEIVING */
// incoming message flow
-int CSkypeProto::OnReceiveMessage(const char *messageId, const char *skypename, time_t timestamp, char *content, int emoteOffset, bool isRead)
+int CSkypeProto::OnReceiveMessage(const char *messageId, const char *url, time_t timestamp, char *content, int emoteOffset, bool isRead)
{
+ ptrA skypename(ContactUrlToName(url));
setDword("LastMsgTime", timestamp);
PROTORECVEVENT recv = { 0 };
recv.flags = PREF_UTF;
@@ -58,7 +59,7 @@ int CSkypeProto::OnReceiveMessage(const char *messageId, const char *skypename,
if (isRead)
recv.flags |= PREF_CREATEREAD;
debugLogA("Incoming message from %s", skypename);
- MCONTACT hContact = GetContact(ptrA(ContactUrlToName(skypename)));
+ MCONTACT hContact = GetContact(skypename);
return ProtoChainRecvMsg(hContact, &recv);
}
diff --git a/protocols/SkypeWeb/src/skype_proto.h b/protocols/SkypeWeb/src/skype_proto.h
index 007bbfe327..84cb3705e8 100644
--- a/protocols/SkypeWeb/src/skype_proto.h
+++ b/protocols/SkypeWeb/src/skype_proto.h
@@ -188,7 +188,7 @@ private:
MEVENT GetMessageFromDB(MCONTACT hContact, DWORD timestamp, const char *messageId);
MEVENT AddMessageToDb(MCONTACT hContact, DWORD timestamp, DWORD flags, const char *messageId, char *content, int emoteOffset = 0);
- int OnReceiveMessage(const char *messageId, const char *skypename, time_t timestamp, char *content, int emoteOffset = 0, bool isRead = false);
+ int OnReceiveMessage(const char *messageId, const char *url, time_t timestamp, char *content, int emoteOffset = 0, bool isRead = false);
int SaveMessageToDb(MCONTACT hContact, PROTORECVEVENT *pre);
int OnSendMessage(MCONTACT hContact, int flags, const char *message);