src/main/java/org/jivesoftware/smack/ChatManager.java
private Chat getUserChat(String userJID) {
        if (matchMode == MatchMode.NONE) {
            return null;
        }

        Chat match = jidChats.get(userJID);

        if (match == null && (matchMode == MatchMode.BARE_JID)) {
            match = baseJidChats.get(StringUtils.parseBareAddress(userJID));
        }
        return match;
    }
private Chat getUserChat(String userJID) {
        if (matchMode == MatchMode.NONE) {
            return null;
        }

        Chat match = jidChats.get(userJID);

        if (match == null && (matchMode == MatchMode.BARE_JID)) {
            match = baseJidChats.get(StringUtils.parseBareAddress(userJID));
        }
        return match;
    }
Try to get a matching chat for the given user JID, based on the
{@link MatchMode}. <li>NONE - return null <li>SUPPLIED_JID - match the
jid in the from field of the message exactly. <li>BARE_JID - if not match
for from field, try the bare jid.

@param userJID
jid in the from field of message.
@return Matching chat, or null if no match found.