[sip-comm-dev] About ChatRoom Pb


#1

Hi,
I've notice many "strange" thinks in Jabber ChatRoom implementation:

*ChatRoomJabberImpl Class:*
In sendMessage() method:
*// We send only the content because it doesn't work if we send the
// Message object.*
this method send just message.content(). It's a bit strange...
To send a complete message (a real org.jivesoftware.smack.packet.Message),
we must set two important info into message object:
*// Before sending message, let's add our full jid for full verification
msg.setType(org.jivesoftware.smack.packet.Message.Type.groupchat);
msg.setTo(this.getIdentifier());*
Without that, there is a (strange) problem with Smack lib: the client is
disconnected!

*OperationSetMultiUserJabberImpl Class:*
- findRoom(String roomName):
*"return the ChatRoom named roomName or null if no such room exists on the
server"*
But this method return never null..it creates always a new ChatRoom.
So it's a problem in the createChatRoom():
this method test if a ChatRoom exist (with findRoom(...) ) and if null it
creates a new room.

- the "String getCanonicalRoomName(String roomName) " method returns a bad
roomName
(maybe not for all the Jabber server, but it's often)
*line 561:
return roomName
   + "@"
   + (String)serviceNamesIter.next();
   //+ jabberProvider.getAccountID().getService(); <-- problem*
it returns an address like: login@test.jabber.frjabber.fr

Finally, the chatRooms are "locked" by default. User must open the
configuration form to unlock the room.
It would be useful to open this window by default.

Cheers,
Julien