예제 #1
0
        protected void SendChatState(string to, string type)
        {
            var node = new ProtocolTreeNode("chatstate", new[] { new KeyValue("to", WhatsApp.GetJID(to)) }, new[] {
                new ProtocolTreeNode(type, null)
            });

            this.SendNode(node);
        }
예제 #2
0
        protected void SendChatState(string to, string type)
        {
            var node = new ProtocolTreeNode("chatstate", new[] { new KeyValue("to", WhatsApp.GetJID(to)) }, new [] {
                new ProtocolTreeNode(type, null)
            });

            this.whatsNetwork.SendData(this.BinWriter.Write(node));
        }
예제 #3
0
        public void SendGetParticipants(string gjid)
        {
            string id    = TicketCounter.MakeId();
            var    child = new ProtocolTreeNode("list", null);
            var    node  = new ProtocolTreeNode("iq", new[] { new KeyValue("id", id), new KeyValue("type", "get"), new KeyValue("xmlns", "w:g2"), new KeyValue("to", WhatsApp.GetJID(gjid)) }, child);

            this.SendNode(node);
        }
예제 #4
0
        /// <summary>
        /// Make a request to retrieve all group participents
        /// </summary>
        /// <param name="gjid">The group jabber id</param>
        public void SendGetParticipants(string gjid)
        {
            string id    = TicketCounter.MakeId("get_participants_");
            var    child = new ProtocolTreeNode("list", null);
            var    node  = new ProtocolTreeNode("iq", new[] { new KeyValue("id", id), new KeyValue("type", "get"), new KeyValue("xmlns", "w:g"), new KeyValue("to", WhatsApp.GetJID(gjid)) }, child);

            this.whatsNetwork.SendData(this.BinWriter.Write(node));
        }