summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_chatrooms.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_chatrooms.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_chatrooms.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_chatrooms.cpp47
1 files changed, 47 insertions, 0 deletions
diff --git a/protocols/SkypeWeb/src/skype_chatrooms.cpp b/protocols/SkypeWeb/src/skype_chatrooms.cpp
index ba6781e958..6662f9c786 100644
--- a/protocols/SkypeWeb/src/skype_chatrooms.cpp
+++ b/protocols/SkypeWeb/src/skype_chatrooms.cpp
@@ -76,4 +76,51 @@ void CSkypeProto::SetChatStatus(MCONTACT hContact, int iStatus)
GCEVENT gce = { sizeof(gce), &gcd };
CallServiceSync(MS_GC_EVENT, true ? SESSION_INITDONE : WINDOW_HIDDEN, (LPARAM)&gce);
CallServiceSync(MS_GC_EVENT, SESSION_ONLINE, (LPARAM)&gce);
+}
+
+/* CHAT EVENT */
+
+void CSkypeProto::OnChatEvent(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 from(mir_t2a(ptrT(json_as_string(json_get(node, "from")))));
+
+ ptrT composeTime(json_as_string(json_get(node, "composetime")));
+ time_t timestamp = IsoToUnixTime(composeTime);
+
+ ptrA content(mir_t2a(ptrT(json_as_string(json_get(node, "content")))));
+ int emoteOffset = json_as_int(json_get(node, "skypeemoteoffset"));
+
+ ptrA conversationLink(mir_t2a(ptrT(json_as_string(json_get(node, "conversationLink")))));
+ 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);
+
+ ptrA messageType(mir_t2a(ptrT(json_as_string(json_get(node, "messagetype")))));
+ 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"))
+ {
+
+ }
+ return; //chats not supported
} \ No newline at end of file