Esempio n. 1
0
        public void handleRawNotification(RawNotification notification)
        {
            XmlDocument doc = new XmlDocument();

            doc.LoadXml(notification.Content);

            XmlNodeList groupXml  = doc.GetElementsByTagName("Group");
            XmlNodeList msgXml    = doc.GetElementsByTagName("Message");
            XmlNodeList actionXml = doc.GetElementsByTagName("Action");

            if (groupXml.Any() && msgXml.Any())
            {
                string groupId = groupXml[0].InnerText;
                string msgId   = msgXml[0].InnerText;

                if (group.group.id == groupId)
                {
                    if (actionXml.Any() && actionXml[0].InnerText == "newAttachment")
                    {
                        History.addMsgFile(msgId);
                    }
                    else
                    {
                        History.retrieveNewMessages();
                    }
                }
            }
        }
Esempio n. 2
0
        public void handleRawNotification(RawNotification notification)
        {
            XmlDocument doc = new XmlDocument();

            doc.LoadXml(notification.Content);

            XmlNodeList groupXml  = doc.GetElementsByTagName("Group");
            XmlNodeList msgXml    = doc.GetElementsByTagName("Message");
            XmlNodeList actionXml = doc.GetElementsByTagName("Action");

            if (groupXml.Any() && msgXml.Any())
            {
                string groupId = groupXml[0].InnerText;
                string action  = actionXml[0].InnerText;

                if (action == "groupUpdate")
                {
                    retrieveGroupsFromServer();
                }
            }
        }