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); }
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)); }
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); }
/// <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)); }