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.
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 email@example.com and firstname.lastname@example.org do not match on the startsWith().
Please check this patch