Hi All,
I am trying to send a group chat message using XMPP connection with Smack 4.1.8.I have created the chatgroup physically and added 2 participants.
From Java client I am trying to connect as one participant and trying to send a message to the group.
Message is received but sender is not recognized and it displays ‘Unknown Contact’ with message in the group.
MultiUserChatManager m =MultiUserChatManager.getInstanceFor(xmppConnection);
//jid is the jid of the chat room
MultiUserChat mchat =m.getMultiUserChat(jid);
mchat.join("NickName");
Message message = new Message(jid, Message.Type.groupchat);
message.setBody("Group");
//jid of chat room
message.setTo(jid);
message.setFrom("jid of sender");
mchat.sendMessage(message);
This code succesfully send the message to the chatgroup.But in chatgroup it displays the message with sender as ‘Unknown Contact’.
What could be the reason?
Thanks
isuru