From dfd240cf80509c4b33e44482e637b6500f4e563a Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Sun, 19 Apr 2015 09:28:27 +0000 Subject: SkypeWeb: Chat fixes. git-svn-id: http://svn.miranda-ng.org/main/trunk@12929 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_history_sync.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'protocols/SkypeWeb/src/skype_history_sync.cpp') 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 -- cgit v1.2.3