in Smack 3.0.4, I think the ChatManager is being inconsistent about the key used in the jidChats map. The "get" uses the "bare" address, but the "put" uses the entire address. I think you want this change. what do you think?
diff old/ChatManager.java new/ChatManager.java
163c163
< jidChats.put(userJID, chat);
---
> jidChats.put(StringUtils.parseBareAddress(userJID), chat);
I've got the same problem. This causes the chatmanager to spawn new chats for every incoming message.
I am using the following listener to get around this problem:
//Workaround for bug in smack
connection.addPacketListener(new PacketListener(){
& nbsp; public void processPacket(Packet p) {
& nbsp; p.setFrom(StringUtils.parseBareAddress( p.getFrom()));
& nbsp; }
},null);
It changes the from address into the bare address. This way I do not have to poke around in the smack code to fix this problem.
I do however hope this bug will end up in the issue tracker.