diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-07-27 10:28:20 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-07-27 10:28:20 +0000 |
commit | 1a0cc38136914d475df14be27198fb2b88494cb8 (patch) | |
tree | cca4e5f96a0cbec8a08fcdb51420c6c1f1ea7f57 /protocols/SkypeWeb/src/skype_events.cpp | |
parent | 8b77c1ba74a24af5ec831385fc876807aed509c0 (diff) |
SkypeWeb: *YAHOO* fixed edited messages sync, other fixes.
git-svn-id: http://svn.miranda-ng.org/main/trunk@14735 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_events.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_events.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/protocols/SkypeWeb/src/skype_events.cpp b/protocols/SkypeWeb/src/skype_events.cpp index f670130e66..c346e6ff1a 100644 --- a/protocols/SkypeWeb/src/skype_events.cpp +++ b/protocols/SkypeWeb/src/skype_events.cpp @@ -33,7 +33,8 @@ INT_PTR CSkypeProto::GetEventText(WPARAM, LPARAM lParam) JSONNode jMsg = JSONNode::parse((char*)pEvent->dbei->pBlob);
if (jMsg)
{
- text.AppendFormat(Translate("Original message:\n\t%s\n"), jMsg["original_message"]["text"].as_string());
+ JSONNode &jOriginalMsg = jMsg["original_message"];
+ text.AppendFormat(Translate("Original message:\n\t%s\n"), jOriginalMsg["text"].as_string().c_str());
JSONNode &jEdits = jMsg["edits"];
for (auto it = jEdits.begin(); it != jEdits.end(); ++it)
{
@@ -43,16 +44,16 @@ INT_PTR CSkypeProto::GetEventText(WPARAM, LPARAM lParam) char szTime[MAX_PATH];
strftime(szTime, sizeof(szTime), "%X %x", localtime(&time));
- text.AppendFormat(Translate("Edited at %s:\n\t%s\n"), szTime, jEdit["text"].as_string());
+ text.AppendFormat(Translate("Edited at %s:\n\t%s\n"), szTime, jEdit["text"].as_string().c_str());
}
}
else
{
#ifdef _DEBUG
- text = (char*)pEvent->dbei->pBlob;
+ text = mir_strdup((char*)pEvent->dbei->pBlob);
#else
- text = Translate("Invalid data!");
+ text = mir_utf8encode(Translate("Invalid data!"));
#endif
}
@@ -131,7 +132,12 @@ INT_PTR CSkypeProto::GetEventText(WPARAM, LPARAM lParam) }
case SKYPE_DB_EVENT_TYPE_INCOMING_CALL:
{
- pszText = Translate("Incoming call.");
+ pszText = Translate("Incoming call");
+ break;
+ }
+ case SKYPE_DB_EVENT_TYPE_UNKNOWN:
+ {
+ pszText = mir_strdup(CMStringA(FORMAT, "Unknown event, please send this text for developer: \"%s\"", (char*)pEvent->dbei->pBlob));
break;
}
default:
@@ -209,6 +215,10 @@ void CSkypeProto::InitDBEvents() dbEventType.descr = Translate("URI object");
CallService(MS_DB_EVENT_REGISTERTYPE, 0, (LPARAM)&dbEventType);
+ dbEventType.eventType = SKYPE_DB_EVENT_TYPE_UNKNOWN;
+ dbEventType.descr = Translate("Unknown event");
+ CallService(MS_DB_EVENT_REGISTERTYPE, 0, (LPARAM)&dbEventType);
+
dbEventType.eventType = SKYPE_DB_EVENT_TYPE_INCOMING_CALL;
dbEventType.descr = Translate("Incoming call");
dbEventType.flags |= DETF_NONOTIFY;
|