summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_history_sync.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-04-19 09:28:27 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-04-19 09:28:27 +0000
commitdfd240cf80509c4b33e44482e637b6500f4e563a (patch)
tree591fe44b26d6aa090aa74ccdcc0ba7f5a766f1c0 /protocols/SkypeWeb/src/skype_history_sync.cpp
parente6f13847b5deb0c9c1dd968364baaa7faa5f7690 (diff)
SkypeWeb: Chat fixes.
git-svn-id: http://svn.miranda-ng.org/main/trunk@12929 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_history_sync.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_history_sync.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/protocols/SkypeWeb/src/skype_history_sync.cpp b/protocols/SkypeWeb/src/skype_history_sync.cpp
index 228b1be561..6c7d34ff16 100644
--- a/protocols/SkypeWeb/src/skype_history_sync.cpp
+++ b/protocols/SkypeWeb/src/skype_history_sync.cpp
@@ -91,16 +91,17 @@ void CSkypeProto::OnGetServerHistory(const NETLIBHTTPREQUEST *response)
}
else if (conversationLink != NULL && strstr(conversationLink, "/19:"))
{
+ ptrA chatname(ChatUrlToName(conversationLink));
+ StartChatRoom(_A2T(chatname), _A2T(chatname));
if (!mir_strcmpi(messageType, "Text") || !mir_strcmpi(messageType, "RichText"))
{
- ptrA chatname(ChatUrlToName(conversationLink));
- GCDEST gcd = { m_szModuleName, ptrT(mir_a2t(chatname)), GC_EVENT_MESSAGE };
+ GCDEST gcd = { m_szModuleName, _A2T(chatname), GC_EVENT_MESSAGE };
GCEVENT gce = { sizeof(GCEVENT), &gcd };
gce.bIsMe = IsMe(ContactUrlToName(from));
- gce.ptszUID = ptrT(mir_a2t(ContactUrlToName(from)));
+ gce.ptszUID = _A2T(ContactUrlToName(from));
gce.time = timestamp;
- gce.ptszNick = ptrT(mir_a2t(ContactUrlToName(from)));
- gce.ptszText = ptrT(mir_a2t(ptrA(RemoveHtml(content))));
+ gce.ptszNick = _A2T(ContactUrlToName(from));
+ gce.ptszText = _A2T(content);
gce.dwFlags = GCEF_NOTNOTIFY;
CallServiceSync(MS_GC_EVENT, 0, (LPARAM)&gce);
}
@@ -164,10 +165,9 @@ void CSkypeProto::OnSyncHistory(const NETLIBHTTPREQUEST *response)
else
continue;
- MCONTACT hContact = !isChat ? AddContact(skypename) : AddChatRoom(skypename);
- if (isChat) StartChatRoom(hContact);
+ MCONTACT hContact = isChat ? NULL : AddContact(skypename);
- if (GetMessageFromDb(hContact, clientMsgId, composeTime) == NULL)
+ if (hContact == NULL || GetMessageFromDb(hContact, clientMsgId, composeTime) == NULL)
PushRequest(new GetHistoryRequest(RegToken, skypename, !isChat ? 100 : 15, isChat, 0,Server), &CSkypeProto::OnGetServerHistory);
}
} \ No newline at end of file