diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-04-25 18:43:32 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-04-25 18:43:32 +0000 |
commit | babe62f61852bb292c4eef1e64c316f21b789ef6 (patch) | |
tree | e852b2ed924b7d341b1856cda829c915cfd52c18 /protocols/SkypeWeb/src/skype_history_sync.cpp | |
parent | 019b48b38636ea582501e4a86193cf54d2df0193 (diff) |
SkypeWeb: "/me" in chats.
git-svn-id: http://svn.miranda-ng.org/main/trunk@13144 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_history_sync.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_history_sync.cpp | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/protocols/SkypeWeb/src/skype_history_sync.cpp b/protocols/SkypeWeb/src/skype_history_sync.cpp index d0a119d5da..8621cce056 100644 --- a/protocols/SkypeWeb/src/skype_history_sync.cpp +++ b/protocols/SkypeWeb/src/skype_history_sync.cpp @@ -49,18 +49,16 @@ void CSkypeProto::OnGetServerHistory(const NETLIBHTTPREQUEST *response) ptrA content(mir_t2a(ptrT(json_as_string(json_get(message, "content")))));
ptrT composeTime(json_as_string(json_get(message, "composetime")));
ptrA conversationLink(mir_t2a(ptrT(json_as_string(json_get(message, "conversationLink")))));
+ int emoteOffset = atoi(ptrA(mir_t2a(ptrT(json_as_string(json_get(message, "skypeemoteoffset"))))));
time_t timestamp = IsoToUnixTime(composeTime);
+ ptrA skypename(ContactUrlToName(from));
bool isEdited = (json_get(message, "skypeeditedid") != NULL);
if (conversationLink != NULL && strstr(conversationLink, "/8:"))
{
if (!mir_strcmpi(messageType, "Text") || !mir_strcmpi(messageType, "RichText"))
{
- int emoteOffset = json_as_int(json_get(message, "skypeemoteoffset"));
-
int flags = DBEF_UTF | DBEF_READ;
- ptrA skypename(ContactUrlToName(from));
-
bool isMe = IsMe(skypename);
if (isMe)
flags |= DBEF_SENT;
@@ -149,15 +147,7 @@ void CSkypeProto::OnGetServerHistory(const NETLIBHTTPREQUEST *response) ptrA chatname(ChatUrlToName(conversationLink));
if (!mir_strcmpi(messageType, "Text") || !mir_strcmpi(messageType, "RichText"))
{
- GCDEST gcd = { m_szModuleName, _A2T(chatname), GC_EVENT_MESSAGE };
- GCEVENT gce = { sizeof(GCEVENT), &gcd };
- gce.bIsMe = IsMe(ContactUrlToName(from));
- gce.ptszUID = mir_a2t(ContactUrlToName(from));
- gce.time = timestamp;
- gce.ptszNick = mir_a2t(ContactUrlToName(from));
- gce.ptszText = mir_a2t(RemoveHtml(content));
- gce.dwFlags = GCEF_NOTNOTIFY;
- CallServiceSync(MS_GC_EVENT, 0, (LPARAM)&gce);
+ AddMessageToChat(_A2T(chatname), _A2T(skypename), content, emoteOffset != NULL, emoteOffset, timestamp, true);
}
}
}
|