private XmlElement CreateJoinPresence(XmlElement elem, RoomStatus[] statuses)
        {
            XmlDocument myDoc = new XmlDocument();

            RoomPresence presence = new RoomPresence(myDoc, jid);

            presence.RemoveAll();
            presence.From = elem.GetAttribute("to");

            UserX xElem = new UserX(myDoc);

            presence.AppendChild(xElem);

            xElem.Status = statuses;

            return(presence);
        }
        private XmlElement CreateUnavailPacket(XmlElement elem)
        {
            XmlDocument myDoc = new XmlDocument();

            RoomPresence presence = new RoomPresence(myDoc, jid);

            presence.RemoveAll();
            presence.Type = PresenceType.unavailable;
            presence.From = elem.GetAttribute("to");

            UserX xElem = new UserX(myDoc);

            presence.AppendChild(xElem);

            xElem.Status = new RoomStatus[] { RoomStatus.SELF };

            return(presence);
        }
        private XmlElement CreateUnavailPacket(XmlElement elem)
        {
            XmlDocument myDoc = new XmlDocument();

            RoomPresence presence = new RoomPresence(myDoc, jid);
            presence.RemoveAll();
            presence.Type = PresenceType.unavailable;
            presence.From = elem.GetAttribute("to");

            UserX xElem = new UserX(myDoc);
            presence.AppendChild(xElem);

            xElem.Status = new RoomStatus[] { RoomStatus.SELF };

            return presence;
        }
        private XmlElement CreateJoinPresence(XmlElement elem, RoomStatus[] statuses)
        {
            XmlDocument myDoc = new XmlDocument();

            RoomPresence presence = new RoomPresence(myDoc, jid);
            presence.RemoveAll();
            presence.From = elem.GetAttribute("to");

            UserX xElem = new UserX(myDoc);
            presence.AppendChild(xElem);

            xElem.Status = statuses;

            return presence;
        }