docs: public Chat chatWith(EntityBareJid jid) {
          Chat chat = chats.get(jid);
          if (chat == null) {
              synchronized (chats) {
                  // Double-checked locking.
                  chat = chats.get(jid);
                  if (chat != null) {
                      return chat;
                  }
                  chat = new Chat(connection(), jid);
                  chats.put(jid, chat);
              }
          }
          return chat;
      }