powered by Jive Software

Multi Chat Message received as 'Unknown COntact'

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

Sounds like the receiving client doesnt get a presence from the MUC.
Is the receiving client also Smack based? Also, why not upgrade to Smack 4.2.3? :slight_smile:

Actually I downgraded from 4.2.3 to 4.1.8 to make SASL work. So it is not an option.

How about the parameters I passed?Or anything missing u see?

It seems a bug in the webclient I used. In standalone clients contact name is shown properly. So we can close this conversation

Thanks
Isuru

1 Like