Monitoring plugin: getConversationKey() is case sensitive


In the monitoring plugin, the getConversationKey() method returns a key based on the bare JID of two users. However, the same JID can have different capitalization, depending on whether it’s the first or second JID, I noticed. A possible cause I can think of is that I have a certain capitalization of a contact in my roster and the server of my contact sends my Openfire server a different capitalization than in my roster.

However it may be, I propose that the JID is first toLowerCase()'d: String getConversationKey(JID jid1, JID jid2) { StringBuilder builder = new StringBuilder(); if (jid1.compareTo(jid2) < 0) { builder.append(jid1.toBareJID().toLowerCase()).append("_").append(jid2.toBareJI D().toLowerCase()); } else { builder.append(jid2.toBareJID().toLowerCase()).append("_").append(jid1.toBareJI D().toLowerCase()); } return builder.toString(); }

Of course tracking the origin of the different capitalization is an option as well.

This issue causes that a conversation between me and that contact is split up into two conversations: one with my messages and one with his.