/// <summary> /// Invite a user to join the room. /// </summary> /// <param name="invitee">The JID of the person to invite</param> /// <param name="reason">The reason for the invite, or null for none.</param> public void Invite(JID invitee, string reason) { if (m_state != STATE.running) throw new InvalidOperationException("Must be in running state to send invite: " + m_state.ToString()); if (invitee == null) throw new ArgumentNullException("invitee"); /* <message from='[email protected]/desktop' to='*****@*****.**'> <x xmlns='http://jabber.org/protocol/muc#user'> <invite to='*****@*****.**'> <reason> Hey Hecate, this is the place for all good witches! </reason> </invite> </x> </message> */ Message m = new Message(m_manager.Stream.Document); m.To = m_room; UserX x = new UserX(m_manager.Stream.Document); x.AddInvite(invitee, reason); m.AddChild(x); m_manager.Write(m); }