By reading asmack source, when create a chat room and invite user to join, the message add a extendsion MUCUser.Invite
.
public void invite(Message message, String user, String reason) {
// TODO listen for 404 error code when inviter supplies a non-existent JID
message.setTo(room);
// Create the MUCUser packet that will include the invitation
MUCUser mucUser = new MUCUser();
MUCUser.Invite invite = new MUCUser.Invite();
invite.setTo(user);
invite.setReason(reason);
mucUser.setInvite(invite);
// Add the MUCUser packet that includes the invitation to the message
message.addExtension(mucUser);
connection.sendPacket(message);
}
I use message.getExtension( "x","http://jabber.org/protocol/muc#user")
, but it return DefaultPacketExtension, not MUCUser.Invite. So I doubt how i can get inviter name.
Any help will be appreciative!