summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_history_sync.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/SkypeWeb/src/skype_history_sync.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_history_sync.cpp8
1 files changed, 8 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);