From 5851536bf2c79d9c7a7ffb4edb69b6a0f6305f9f Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Sat, 30 May 2015 20:05:40 +0000 Subject: SkypeWeb: More fixes... git-svn-id: http://svn.miranda-ng.org/main/trunk@13911 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/requests/chatrooms.h | 4 ++-- protocols/SkypeWeb/src/skype_chatrooms.cpp | 6 +++--- protocols/SkypeWeb/src/skype_history_sync.cpp | 2 +- protocols/SkypeWeb/src/skype_messages.cpp | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'protocols') diff --git a/protocols/SkypeWeb/src/requests/chatrooms.h b/protocols/SkypeWeb/src/requests/chatrooms.h index 84b58e68e9..905f6afd47 100644 --- a/protocols/SkypeWeb/src/requests/chatrooms.h +++ b/protocols/SkypeWeb/src/requests/chatrooms.h @@ -52,7 +52,7 @@ public: node.push_back(JSONNode("clientmessageid", (long)timestamp)); node.push_back(JSONNode("messagetype", "RichText")); node.push_back(JSONNode("contenttype", "text")); - node.push_back(JSONNode("content", (char*)ptrA(mir_utf8encode(message)))); + node.push_back(JSONNode("content", message)); Body << VALUE(node.write().c_str()); } @@ -73,7 +73,7 @@ public: node.push_back(JSONNode("clientmessageid", (long)timestamp)); node.push_back(JSONNode("messagetype", "RichText")); node.push_back(JSONNode("contenttype", "text")); - node.push_back(JSONNode("content", (char*)ptrA(mir_utf8encode(message)))); + node.push_back(JSONNode("content", message)); node.push_back(JSONNode("skypeemoteoffset", 4)); Body << VALUE(node.write().c_str()); diff --git a/protocols/SkypeWeb/src/skype_chatrooms.cpp b/protocols/SkypeWeb/src/skype_chatrooms.cpp index 96a6e450e4..6cf49cc4a9 100644 --- a/protocols/SkypeWeb/src/skype_chatrooms.cpp +++ b/protocols/SkypeWeb/src/skype_chatrooms.cpp @@ -395,7 +395,7 @@ void CSkypeProto::OnSendChatMessage(const TCHAR *chat_id, const TCHAR * tszMessa if (!IsOnline()) return; ptrA szChatId(mir_t2a(chat_id)); - ptrA szMessage(mir_t2a(tszMessage)); + ptrA szMessage(mir_utf8encodeT(tszMessage)); if (strncmp(szMessage, "/me ", 4) == 0) SendRequest(new SendChatActionRequest(RegToken, szChatId, time(NULL), szMessage, Server)); else @@ -461,7 +461,7 @@ void CSkypeProto::OnGetChatInfo(const NETLIBHTTPREQUEST *response, void *p) void CSkypeProto::RenameChat(const char *chat_id, const char *name) { ptrT tchat_id(mir_a2t(chat_id)); - ptrT tname(mir_a2t_cp(name, CP_UTF8)); + ptrT tname(mir_utf8decodeT(name)); GCDEST gcd = { m_szModuleName, tchat_id, GC_EVENT_CHANGESESSIONAME }; GCEVENT gce = { sizeof(gce), &gcd }; @@ -473,7 +473,7 @@ void CSkypeProto::ChangeChatTopic(const char *chat_id, const char *topic, const { ptrT tchat_id(mir_a2t(chat_id)); ptrT tname(mir_a2t(initiator)); - ptrT ttopic(mir_a2t(topic)); + ptrT ttopic(mir_utf8decodeT(topic)); GCDEST gcd = { m_szModuleName, tchat_id, GC_EVENT_TOPIC }; GCEVENT gce = { sizeof(gce), &gcd }; diff --git a/protocols/SkypeWeb/src/skype_history_sync.cpp b/protocols/SkypeWeb/src/skype_history_sync.cpp index fce18b160b..7933d114d5 100644 --- a/protocols/SkypeWeb/src/skype_history_sync.cpp +++ b/protocols/SkypeWeb/src/skype_history_sync.cpp @@ -87,7 +87,7 @@ void CSkypeProto::OnGetServerHistory(const NETLIBHTTPREQUEST *response) db_event_get(dbevent, &dbei); time_t dbEventTimestamp = dbei.timestamp; - ptrA dbMsgText(NEWSTR_ALLOCA((char *)dbei.pBlob)); + char *dbMsgText = NEWSTR_ALLOCA((char *)dbei.pBlob); TCHAR time[64]; _locale_t locale = _create_locale(LC_ALL, ""); diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp index 309c4ea5a1..a990eb669b 100644 --- a/protocols/SkypeWeb/src/skype_messages.cpp +++ b/protocols/SkypeWeb/src/skype_messages.cpp @@ -179,7 +179,7 @@ void CSkypeProto::OnPrivateMessageEvent(const JSONNode &node) time_t dbEventTimestamp = dbei.timestamp; - ptrA dbMsgText(NEWSTR_ALLOCA((char *)dbei.pBlob)); + char *dbMsgText = NEWSTR_ALLOCA((char *)dbei.pBlob); TCHAR time[64]; _locale_t locale = _create_locale(LC_ALL, ""); -- cgit v1.2.3