Using MultiUserChat and invite users to a chatroom

Hi,

I’'m creating a plugin of some sort that allows to popup the messenger to notify the dev if an error occurs on the main program.

MultiUserChat muc = new MultiUserChat(_connection, "room@chat.example.com");

muc.create(“testbot”);

muc.sendConfigurationForm(new Form(Form.TYPE_SUBMIT));

// userarraylist is a list of selected user

for (int i = 0; i < userarraylist.size(); i++) {

Message message = new Message(userarraylist.get(i));

message.setBody(“Join me for a group chat!”);

message.addExtension(new GroupChatInvitation("room@chat.example.com"););

_connection.sendPacket(message);

}

it works on one user request. but i need to send to many accounts, is this possible? how can i invite multiple users?

Thanks a lot.

Regards,

rkhe

null

null

I’'ve tried to use MultiUserChat.invite

but it only invites 2 users…

more than that, it just finish the program and doesn’'t

pop any invitation.

Weird, after I added the “XMPPConnection.DEBUG_ENABLED = true;” to debug my code, it now seems to send all the invitations.

XMPPConnection.DEBUG_ENABLED = true;

// assume i have already a _connection

MultiUserChat muc = new MultiUserChat(_connection, “room@conference.localhost”);

// Create the room

muc.create(“user0”);

muc.sendConfigurationForm(new Form(Form.TYPE_SUBMIT));

muc.invite(“user1@localhost”,“some message”);

muc.invite(“user2@localhost”,“some message”);

muc.invite(“user3@localhost”,“some message”);

Do you guys have any idea what happen?