Closed Dases95 closed 5 years ago
Hello. As Jabber-Net currently has no direct support of that feature, you'll have to use the low-level features to make it work. Quick look at XEP-0313 makes me think you'll need to prepare special IQ queries and send them to the server. Jabber-Net has the low-lever infrastructure to do that.
You could also take a look at the How do I add my own packet types? FAQ entry.
i have to create an "YourQuery" object and put the special IQ queries as a parameter ?
YourQuery
itself is a special IQ query.
how to set the type of the IQ using yourQuery
and how to send this query to the server
What do you mean by the "type of the IQ"? IQ is one of the packet types in the XMPP protocol. And you, the user, should fill it with the data you need.
To send it (or any packet actually) to the server, you should call XmppStream.Write
. One example of XmppStream
you're probably familiar with is a JabberClient
.
i tried this but no result appear
private void j_OnStreamInit(object sender, ElementStream stream)
{
XmlDocument doc = new XmlDocument();
doc.InnerXml = "<query xmlns = 'urn:xmpp:mam:2'><x xmlns = 'jabber:x:data' type = 'submit'><field var = 'FORM_TYPE' type = 'hidden'><value> urn:xmpp:mam:2 </value></field><field var ='with' ><value>admin@DESKTOP-MUBI565</value></field></x></query>";
YourQuery myQuery = new YourQuery(doc);
XmppStream x = (XmppStream)sender;
x.Write(myQuery);
stream.AddFactory(new MyFactory());
}
Which result do you expect?
The response from the server
And how do you observe the response from the server?
I'm making simple XMPP client using Jabber-Net. To send simple message, i need a simple example on how to retrieve message history?