1 20 21 package org.xmpp.muc; 22 23 import org.dom4j.Element; 24 import org.xmpp.packet.Message; 25 26 44 public class Invitation extends Message { 45 46 53 public Invitation(String invitee, String reason) { 54 super(); 55 Element element = addChildElement("x", "http://jabber.org/protocol/muc#user"); 56 Element invite = element.addElement("invite"); 57 invite.addAttribute("to", invitee); 58 if (reason != null && reason.length() > 0) { 59 invite.addElement("reason").setText(reason); 60 } 61 } 62 } 63 | Popular Tags |