summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_poll_processing.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-04-10 16:17:44 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-04-10 16:17:44 +0000
commitbc4739cfef31ece629fdd1cf3e1d67f1ddd3d996 (patch)
tree147e87efe28776ffe4c1b0bcee3e9b290dc97cf7 /protocols/SkypeWeb/src/skype_poll_processing.cpp
parent9a306ffdd5e1b67673c2df5d17c352bdee188ec9 (diff)
Skype: messagging refactoring
git-svn-id: http://svn.miranda-ng.org/main/trunk@12748 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_poll_processing.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_poll_processing.cpp68
1 files changed, 7 insertions, 61 deletions
diff --git a/protocols/SkypeWeb/src/skype_poll_processing.cpp b/protocols/SkypeWeb/src/skype_poll_processing.cpp
index 7d59ab5a0e..dd220f77dd 100644
--- a/protocols/SkypeWeb/src/skype_poll_processing.cpp
+++ b/protocols/SkypeWeb/src/skype_poll_processing.cpp
@@ -100,70 +100,16 @@ void CSkypeProto::ProcessNewMessageRes(JSONNODE *node)
ptrA conversationLink(mir_t2a(ptrT(json_as_string(json_get(node, "conversationLink")))));
time_t timestamp = IsoToUnixTime(composeTime);
int emoteOffset = json_as_int(json_get(node, "skypeemoteoffset"));
- if (strstr(conversationLink, "/19:"))
- {
- ptrA chatname(ChatUrlToName(conversationLink));
- ptrA topic(mir_t2a(ptrT(json_as_string(json_get(node, "threadtopic")))));
- MCONTACT chatContact = AddChatRoom(chatname);
- SetChatStatus(chatContact, ID_STATUS_ONLINE);
- if (!mir_strcmpi(messageType, "Text") || !mir_strcmpi(messageType, "RichText"))
- {
- }
- else if (!mir_strcmpi(messageType, "ThreadActivity/AddMember"))
- {
-
- }
- else if (!mir_strcmpi(messageType, "ThreadActivity/DeleteMember"))
- {
-
- }
- else if (!mir_strcmpi(messageType, "ThreadActivity/TopicUpdate"))
- {
-
- }
- else if (!mir_strcmpi(messageType, "ThreadActivity/RoleUpdate"))
- {
+ if (strstr(conversationLink, "/8:"))
+ OnPrivateMessageEvent(node);
+ else if (strstr(conversationLink, "/19:"))
+ OnChatEvent(node);
- }
- return; //chats not supported
- }
- else if (strstr(conversationLink, "/8:"))
+ /*else if (!mir_strcmpi(messageType, "Event/SkypeVideoMessage"))
{
- OnPrivateMessageEvent(node);
- ptrA skypename(ContactUrlToName(from));
-
- if (IsMe(skypename))
- {
- MCONTACT hContact = FindContact(ptrA(ContactUrlToName(conversationLink)));
- int hMessage = atoi(clientMsgId);
- ProtoBroadcastAck(hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE)hMessage, 0);
- debugLogA(__FUNCTION__" timestamp = %d clientmsgid = %s", timestamp, clientMsgId);
- AddMessageToDb(hContact, timestamp, DBEF_UTF | DBEF_SENT, clientMsgId, &content[emoteOffset], emoteOffset);
- }
- else
- {
- MCONTACT hContact = AddContact(skypename, true);
- if (!mir_strcmpi(messageType, "Control/Typing"))
- CallService(MS_PROTO_CONTACTISTYPING, hContact, 5);
- else if (!mir_strcmpi(messageType, "Control/ClearTyping"))
- CallService(MS_PROTO_CONTACTISTYPING, hContact, 0);
- else if (!mir_strcmpi(messageType, "Text") || !mir_strcmpi(messageType, "RichText"))
- {
-
- if (IsMe(skypename))
- {
-
- }
- debugLogA(__FUNCTION__" timestamp = %d clientmsgid = %s", timestamp, clientMsgId);
- OnReceiveMessage(clientMsgId, from, timestamp, content, emoteOffset);
- }
- }
- /*else if (!mir_strcmpi(messageType, "Event/SkypeVideoMessage"))
- {
- return; //not supported
- }*/
- }
+ return; //not supported
+ }*/
}
void CSkypeProto::ProcessConversationUpdateRes(JSONNODE *node)