powered by Jive Software

Problem with sendMessage(Message message)

Hi, I m having a problem with the sendMessage(Message) in a MUC.

When i send a message using sendMessage(String), the PacketListener receives the message and everything is working correctly. When i try to use sendMessage(Message), the listener doesn’'t even receive the message

Any idea ? Is there a special listener to implement to manage the messages ?


IIRC, sendMessage(String) ultimately calls sendMessage(Message).

When you construct the Message object, do you set threadID? It could be that if that is missing, the listener discards it because it has no way of knowing which chat session it belongs to…

Other thing you might need to set is type to Message.Type.groupchat

EDIT: here’'s what sendMessage(string) does, according to javadocs

Message message = chat.createMessage();



Message was edited by: Op3racional

ok, thx much, it was very helpfull

I was doing : Message message = new message() instead of chat.createMessage()

Thx again