diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-04-03 21:06:18 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-04-03 21:06:18 +0000 |
commit | 035b5186bba8c0cab7d349f849c5c1db7cad7e39 (patch) | |
tree | f494a37398b31665d4deb6ebd2e2e52eb98292ef /protocols/SkypeWeb/src/skype_poll_processing.cpp | |
parent | 77633ec5799b374a1899d05ae69a2e5f978f2a7c (diff) |
SkypeWeb: messaging support (patch from MikalaiR)
git-svn-id: http://svn.miranda-ng.org/main/trunk@12595 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_poll_processing.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_poll_processing.cpp | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/protocols/SkypeWeb/src/skype_poll_processing.cpp b/protocols/SkypeWeb/src/skype_poll_processing.cpp index c69722d93d..24baf6f8e1 100644 --- a/protocols/SkypeWeb/src/skype_poll_processing.cpp +++ b/protocols/SkypeWeb/src/skype_poll_processing.cpp @@ -94,24 +94,21 @@ void CSkypeProto::ProcessNewMessageRes(JSONNODE *node) else if (strstr(conversationLink, "/8:"))
{
if (!mir_strcmpi(messagetype, "Control/Typing"))
- {
- MCONTACT hContact = GetContact(ContactUrlToName(from));
- CallService(MS_PROTO_CONTACTISTYPING, hContact, 5);
- }
+ {
+ MCONTACT hContact = GetContact(ContactUrlToName(from));
+ CallService(MS_PROTO_CONTACTISTYPING, hContact, 5);
+ }
else if (!mir_strcmpi(messagetype, "Control/ClearTyping"))
{
return;
}
- else if (!mir_strcmpi(messagetype, "Text") || !mir_strcmpi(messagetype, "RichText")) {
- PROTORECVEVENT recv = { 0 };
- recv.flags = PREF_UTF;
- recv.timestamp = timeStamp;
- recv.szMessage = content;
- debugLogA("Incoming message from %s", ContactUrlToName(from));
- if (IsMe(ContactUrlToName(from)))
- return; //it should be rewritten
- MCONTACT hContact = GetContact(ContactUrlToName(from));
- OnReceiveMessage(hContact, &recv);
+ else if (!mir_strcmpi(messagetype, "Text") || !mir_strcmpi(messagetype, "RichText"))
+ {
+ OnReceiveMessage(from, conversationLink, timeStamp, content);
+ }
+ else if (!mir_strcmpi(messagetype, "Event/SkypeVideoMessage"))
+ {
+ return; //not supported
}
}
}
\ No newline at end of file |