summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_poll_processing.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-04-04 22:00:18 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-04-04 22:00:18 +0000
commit04da76c5fae4f4ef3eda995641b0251671d6edd0 (patch)
treedd5a96c5a9524e4e2baf94ea854e4a19dfae2471 /protocols/SkypeWeb/src/skype_poll_processing.cpp
parentc89e8a054ac888b27065916ffde96af73404228c (diff)
SkypeWeb: support of actions (/me ...)
git-svn-id: http://svn.miranda-ng.org/main/trunk@12600 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_poll_processing.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_poll_processing.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/protocols/SkypeWeb/src/skype_poll_processing.cpp b/protocols/SkypeWeb/src/skype_poll_processing.cpp
index e2f0f6c0de..9f0cc24fa1 100644
--- a/protocols/SkypeWeb/src/skype_poll_processing.cpp
+++ b/protocols/SkypeWeb/src/skype_poll_processing.cpp
@@ -76,13 +76,13 @@ void CSkypeProto::ProcessUserPresenceRes(JSONNODE *node)
void CSkypeProto::ProcessNewMessageRes(JSONNODE *node)
{
ptrA clientMsgId(mir_t2a(ptrT(json_as_string(json_get(node, "clientmessageid")))));
- ptrA skypeeditedid(mir_t2a(ptrT(json_as_string(json_get(node, "skypeeditedid")))));
- ptrA messagetype(mir_t2a(ptrT(json_as_string(json_get(node, "messagetype")))));
+ ptrA skypeEditedId(mir_t2a(ptrT(json_as_string(json_get(node, "skypeeditedid")))));
+ ptrA messageType(mir_t2a(ptrT(json_as_string(json_get(node, "messagetype")))));
ptrA from(mir_t2a(ptrT(json_as_string(json_get(node, "from")))));
ptrA content(mir_t2a(ptrT(json_as_string(json_get(node, "content")))));
- TCHAR *composeTime = json_as_string (json_get(node, "composetime"));
+ ptrT composeTime(json_as_string (json_get(node, "composetime")));
ptrA conversationLink(mir_t2a(ptrT(json_as_string(json_get(node, "conversationLink")))));
- time_t timeStamp = IsoToUnixTime(composeTime);
+ time_t timestamp = IsoToUnixTime(composeTime);
char *convname;
if (strstr(conversationLink, "/19:"))
{
@@ -93,21 +93,22 @@ void CSkypeProto::ProcessNewMessageRes(JSONNODE *node)
}
else if (strstr(conversationLink, "/8:"))
{
- if (!mir_strcmpi(messagetype, "Control/Typing"))
+ if (!mir_strcmpi(messageType, "Control/Typing"))
{
MCONTACT hContact = GetContact(ContactUrlToName(from));
CallService(MS_PROTO_CONTACTISTYPING, hContact, 5);
}
- else if (!mir_strcmpi(messagetype, "Control/ClearTyping"))
+ else if (!mir_strcmpi(messageType, "Control/ClearTyping"))
{
MCONTACT hContact = GetContact(ContactUrlToName(from));
CallService(MS_PROTO_CONTACTISTYPING, hContact, 0);
}
- else if (!mir_strcmpi(messagetype, "Text") || !mir_strcmpi(messagetype, "RichText"))
+ else if (!mir_strcmpi(messageType, "Text") || !mir_strcmpi(messageType, "RichText"))
{
- OnReceiveMessage(from, conversationLink, timeStamp, content);
+ int emoteOffset = json_as_int(json_get(node, "skypeemoteoffset"));
+ OnReceiveMessage(clientMsgId, from, conversationLink, timestamp, content, emoteOffset);
}
- else if (!mir_strcmpi(messagetype, "Event/SkypeVideoMessage"))
+ else if (!mir_strcmpi(messageType, "Event/SkypeVideoMessage"))
{
return; //not supported
}