Smack FromMatchesFilter behaves wrong with chats with similar names


It seems that e.g. 'sss' and 'ssss' (or 'S' and 'INS' and similar) are in some manner the same rooms for Spark. If those two rooms are opened and someone sends a message into one of them, then Spark will show this message in both rooms. If you close one of them and reopen, then its history will be posted in both rooms.




Robin Collier
March 20, 2011, 2:39 PM

After looking at the Smack filter, I don't see anything wrong with it. The only way I can see this happening is if the filter is constructed with only the room name instead of the actual JID. Ideally the filter should throw an IllegalArgumentException when in invalid JID is entered, but either way it is still documented that a full or base JID is the input.

Thus ss@muc.server and sss@muc.server do not match on the startsWith().

Konstantin Zolotarev
June 1, 2010, 2:27 PM

Please check this patch

Cannot Reproduce
Your pinned fields
Click on the next to a field label to start pinning.


Robin Collier


Konstantin Zolotarev