diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-04-15 17:50:34 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-04-15 17:50:34 +0000 |
commit | 9e3ba523300180641ef7a22f791bd3ae89ec4785 (patch) | |
tree | a47ff628897b2a4784257996bf48538231137b84 /protocols | |
parent | 898fb29993b51a46f7ebd9e28b37448ce7f90f7a (diff) |
SkypeWeb: Edited messages support part 3.
git-svn-id: http://svn.miranda-ng.org/main/trunk@12842 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/SkypeWeb/src/skype_history_sync.cpp | 8 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_messages.cpp | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/protocols/SkypeWeb/src/skype_history_sync.cpp b/protocols/SkypeWeb/src/skype_history_sync.cpp index 58d3b5a014..72081578dc 100644 --- a/protocols/SkypeWeb/src/skype_history_sync.cpp +++ b/protocols/SkypeWeb/src/skype_history_sync.cpp @@ -63,9 +63,17 @@ void CSkypeProto::OnGetServerHistory(const NETLIBHTTPREQUEST *response) {
DBEVENTINFO dbei = { sizeof(dbei) };
CMStringA msg;
+
+ dbei.cbBlob = db_event_getBlobSize(dbevent);
+ mir_ptr<BYTE> blob((PBYTE)mir_alloc(dbei.cbBlob));
+ dbei.pBlob = blob;
+
db_event_get(dbevent, &dbei);
time_t dbEventTimestamp = dbei.timestamp;
ptrA dbMsgText((char *)mir_alloc(dbei.cbBlob));
+
+ mir_strcpy(dbMsgText, (char*)dbei.pBlob);
+
msg.AppendFormat("%s\n%s [%s]:\n%s", dbMsgText, Translate("Edited at"), ptrA(mir_t2a(composeTime)), message);
db_event_delete(hContact, dbevent);
AddMessageToDb(hContact, dbEventTimestamp, flags, clientMsgId, msg.GetBuffer(), emoteOffset);
diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp index 2994ef3967..c125c3da85 100644 --- a/protocols/SkypeWeb/src/skype_messages.cpp +++ b/protocols/SkypeWeb/src/skype_messages.cpp @@ -244,9 +244,17 @@ void CSkypeProto::OnPrivateMessageEvent(JSONNODE *node) {
DBEVENTINFO dbei = { sizeof(dbei) };
CMStringA msg;
+
+ dbei.cbBlob = db_event_getBlobSize(dbevent);
+ mir_ptr<BYTE> blob((PBYTE)mir_alloc(dbei.cbBlob));
+ dbei.pBlob = blob;
+
db_event_get(dbevent, &dbei);
+
time_t dbEventTimestamp = dbei.timestamp;
ptrA dbMsgText((char *)mir_alloc(dbei.cbBlob));
+ mir_strcpy(dbMsgText, (char*)dbei.pBlob);
+
msg.AppendFormat("%s\n%s [%s]:\n%s", dbMsgText, Translate("Edited at"), ptrA(mir_t2a(composeTime)), message);
db_event_delete(hContact, dbevent);
OnReceiveMessage(clientMsgId, from, dbEventTimestamp, msg.GetBuffer(), emoteOffset);
|