summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/SkypeWeb/src/skype_events.cpp26
-rw-r--r--protocols/SkypeWeb/src/skype_history_sync.cpp2
-rw-r--r--protocols/SkypeWeb/src/skype_search.cpp9
-rw-r--r--protocols/SkypeWeb/src/skype_utils.cpp1
4 files changed, 16 insertions, 22 deletions
diff --git a/protocols/SkypeWeb/src/skype_events.cpp b/protocols/SkypeWeb/src/skype_events.cpp
index 6a15a6a553..8c76ab9de0 100644
--- a/protocols/SkypeWeb/src/skype_events.cpp
+++ b/protocols/SkypeWeb/src/skype_events.cpp
@@ -71,7 +71,7 @@ INT_PTR CSkypeProto::GetCallEventText(WPARAM, LPARAM lParam)
ptrA fileName(mir_utf8encodeT(ptrT((TCHAR*)xmlGetText(xmlNode))));
if (fileName != NULL)
{
- CMStringA msg(FORMAT, "%s:\n\t%s: %s\n\t%s: %d %s", Translate("File transfer"), Translate("File name"), fileName, Translate("Size"), fileSize, Translate("bytes"));
+ CMStringA msg(FORMAT, Translate("File transfer:\n\tFile name: %s\n\tSize: %d bytes"), fileName, fileSize);
text.AppendFormat("%s\n", msg);
}
@@ -128,20 +128,20 @@ INT_PTR CSkypeProto::EventGetIcon(WPARAM wParam, LPARAM lParam)
{
case SKYPE_DB_EVENT_TYPE_CALL_INFO:
case SKYPE_DB_EVENT_TYPE_INCOMING_CALL:
- {
- icon = IcoLib_GetIconByHandle(GetIconHandle("inc_call"));
- break;
- }
+ {
+ icon = IcoLib_GetIconByHandle(GetIconHandle("inc_call"));
+ break;
+ }
case SKYPE_DB_EVENT_TYPE_ACTION:
- {
- icon = IcoLib_GetIconByHandle(GetIconHandle("me_action"));
- break;
- }
+ {
+ icon = IcoLib_GetIconByHandle(GetIconHandle("me_action"));
+ break;
+ }
default:
- {
- icon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
- break;
- }
+ {
+ icon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
+ break;
+ }
}
return (INT_PTR)((wParam & LR_SHARED) ? icon : CopyIcon(icon));
diff --git a/protocols/SkypeWeb/src/skype_history_sync.cpp b/protocols/SkypeWeb/src/skype_history_sync.cpp
index 060855f72a..91f1041276 100644
--- a/protocols/SkypeWeb/src/skype_history_sync.cpp
+++ b/protocols/SkypeWeb/src/skype_history_sync.cpp
@@ -109,9 +109,7 @@ void CSkypeProto::OnGetServerHistory(const NETLIBHTTPREQUEST *response)
}
else if (!mir_strcmpi(messageType.c_str(), "RichText/UriObject"))
{
- //content=<URIObject type="Picture.1" uri="https://api.asm.skype.com/v1//objects/0-weu-d1-262f0a1ee256d03b8e4b8360d9208834" url_thumbnail="https://api.asm.skype.com/v1//objects/0-weu-d1-262f0a1ee256d03b8e4b8360d9208834/views/imgt1"><Title></Title><Description></Description>Для просмотра этого общего фото перейдите по ссылке: https://api.asm.skype.com/s/i?0-weu-d1-262f0a1ee256d03b8e4b8360d9208834<meta type="photo" originalName="ysd7ZE4BqOg.jpg"/><OriginalName v="ysd7ZE4BqOg.jpg"/></URIObject>
AddDbEvent(SKYPE_DB_EVENT_TYPE_URIOBJ, hContact, timestamp, DBEF_UTF, content.c_str(), clientMsgId.c_str());
-
}
}
else if (conversationLink.find("/19:") != -1)
diff --git a/protocols/SkypeWeb/src/skype_search.cpp b/protocols/SkypeWeb/src/skype_search.cpp
index d8f1d2a3a2..3343dd5f2d 100644
--- a/protocols/SkypeWeb/src/skype_search.cpp
+++ b/protocols/SkypeWeb/src/skype_search.cpp
@@ -56,17 +56,14 @@ void CSkypeProto::OnSearch(const NETLIBHTTPREQUEST *response)
const JSONNode &items = root.as_array();
for (size_t i = 0; i < items.size(); i++)
{
- const JSONNode &item = items.at(i);
+ const JSONNode &item = items[i];
const JSONNode &ContactCards = item["ContactCards"];
const JSONNode &Skype = ContactCards["Skype"];
- CMStringA displayName(Skype["DisplayName"].as_string().c_str());
- CMStringA nick(Skype["SkypeName"].as_string().c_str());
-
PROTOSEARCHRESULT psr = { sizeof(psr) };
psr.flags = PSR_UTF8;
- psr.id.a = nick.GetBuffer();
- psr.nick.a = displayName.GetBuffer();
+ psr.id.a = mir_strdup(Skype["SkypeName"].as_string().c_str());
+ psr.nick.a = mir_strdup(Skype["DisplayName"].as_string().c_str());
ProtoBroadcastAck(0, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)1, (LPARAM)&psr);
}
diff --git a/protocols/SkypeWeb/src/skype_utils.cpp b/protocols/SkypeWeb/src/skype_utils.cpp
index ca560b5e65..cf0fcf7be5 100644
--- a/protocols/SkypeWeb/src/skype_utils.cpp
+++ b/protocols/SkypeWeb/src/skype_utils.cpp
@@ -636,7 +636,6 @@ INT_PTR CSkypeProto::ParseSkypeUriService(WPARAM, LPARAM lParam)
psr.id.t = mir_tstrdup(szJid);
psr.nick.t = mir_tstrdup(szJid);
psr.flags = PSR_TCHAR;
-
ADDCONTACTSTRUCT acs;
acs.handleType = HANDLE_SEARCHRESULT;
acs.szProto = m_szModuleName;