XMPP/Jabber group chat

How do I implement XMPP/Jabber group chat?

Date Entered: 09/27/2007    Last Updated: 01/07/2008

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 entry please contact our support team at kb@nsoftware.com.