diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-04-08 14:57:55 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-04-08 14:57:55 +0000 |
commit | 297742b7868ed4b757ed04bf71a74f164c1db39f (patch) | |
tree | 105b9fe09a2240799fccba595a512978b638d262 /protocols/SkypeWeb/src | |
parent | 31d54e045f95a589dffa84d622665b589b2ccfc1 (diff) |
SkypeWeb: Fix receiving messages from users not on the list.
git-svn-id: http://svn.miranda-ng.org/main/trunk@12676 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src')
-rw-r--r-- | protocols/SkypeWeb/src/skype_poll_processing.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/protocols/SkypeWeb/src/skype_poll_processing.cpp b/protocols/SkypeWeb/src/skype_poll_processing.cpp index cdf2457813..8cf980e324 100644 --- a/protocols/SkypeWeb/src/skype_poll_processing.cpp +++ b/protocols/SkypeWeb/src/skype_poll_processing.cpp @@ -112,23 +112,26 @@ void CSkypeProto::ProcessNewMessageRes(JSONNODE *node) }
else if (strstr(conversationLink, "/8:"))
{
+ ptrA skypename(ContactUrlToName(from));
+ MCONTACT hContact = GetContact(skypename);
+
+ if (hContact == NULL && !IsMe(skypename))
+ AddContact(skypename, true);
+
if (!mir_strcmpi(messageType, "Control/Typing"))
{
- MCONTACT hContact = GetContact(ContactUrlToName(from));
CallService(MS_PROTO_CONTACTISTYPING, hContact, 5);
}
else if (!mir_strcmpi(messageType, "Control/ClearTyping"))
- {
- MCONTACT hContact = GetContact(ContactUrlToName(from));
+ {
CallService(MS_PROTO_CONTACTISTYPING, hContact, 0);
}
else if (!mir_strcmpi(messageType, "Text") || !mir_strcmpi(messageType, "RichText"))
{
int emoteOffset = json_as_int(json_get(node, "skypeemoteoffset"));
- ptrA skypename(ContactUrlToName(from));
if (IsMe(skypename))
{
- MCONTACT hContact = GetContact(ptrA(ContactUrlToName(conversationLink)));
+ hContact = GetContact(ptrA(ContactUrlToName(conversationLink)));
int hMessage = atoi(clientMsgId);
ProtoBroadcastAck(hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE)hMessage, 0);
AddMessageToDb(hContact, timestamp, DBEF_UTF | DBEF_SENT, clientMsgId, &content[emoteOffset], emoteOffset);
|