XMPP/Jabber group chat


The XMPP (Jabber) component supports any number of XEP/JEP's through the SendCommand method, which you can use to send any command you like. This can be used to implement group chat (aka multi-user chat), for example:

To join a room:

xmpp.SendCommand("<presence to=\"chatroom@conference.server/username\">\n<priority>0</priority>\n</presence>");

To send a message to the room:

xmpp.MessageText = "Hello room!"; xmpp.MessageType = XmppMessageTypes.mtGroupChat; xmpp.SendMessage("chatroom@conference.server");

To exit a room:

xmpp.SendCommand("<presence to=\"chatroom@conference.server/username\" type=\"unavailable\"/>");

We appreciate your feedback. If you have any questions, comments, or suggestions about this article please contact our support team at support@nsoftware.com.