addExtension in a MUC message?

Hi all,

It’s possible to send a message with an extension in a multi-user chat ?

Message msg =new org.jivesoftware.smack.packet.Message();

msg.addExtension(new MyExtension); //MyExtension, implements PacketExtension

msg.setBody(“hello”);

multiUserChat.sendMessage(msg);

There are many problems : disconnect, errors…

I must sent only the content because it doesn’t work if I send directly

the Message object. (multiUserChat.sendMessage(msg.getBody()):wink:

Can you help us?

There is a solution?

Thanks you very much.

S2S in openfire 3.5.0 is very unstable

Please, use the search, and do not create new discussions: there are a lot of topics about same problems.

For example: http://www.igniterealtime.org/community/message/168537

Thank you for your response,

but I work with the Smack lib, in a jabber test client.

I think, my problem is into the lib (parser error?),

and the server receives nothing…

Maybe it’s not possible?

I’ll try to find…

Hi,

I have not done this, so I can’t say for sure if it actually is possible. In my experience though, when you get disconnects it is because of calling things out of order or providing bad input. So the first thing I would double-check is whether the extension data you are adding is actually valid XML and does not violate any rules of XMPP. Things like not properly escaping symbols or using unusual characters are good things to check for example.

Chris

Thank you for the responses

I didn’t given all informations for the message.

Although MultiUserChat has this info, it’s necessary to add in messages (not essential for the simple Chat in lib Smack) :

msg.setType(Message.Type.groupchat);

msg.setTo(roomID);

It was simple, but the error caused (disconnect without exception) is a bit strange :s

Thanks you very much.