String getThreadId(User user) {
   String id = myUser2Thread.get(user.getName());
   if (id == null) {
     id = myThreadIdPrefix + myCurrentThreadId++;
     myUser2Thread.put(user.getName(), id);
   }
   return id;
 }
 private void updateIsIDEtalkClient(String jabberId, User user) {
   if (getResource(jabberId)
       .toLowerCase()
       .startsWith(JabberFacade.IDETALK_RESOURCE.toLowerCase())) {
     myIDEtalkUsers.add(user.getName());
   } else {
     myIDEtalkUsers.remove(user.getName());
   }
 }
 @Nullable
 private Presence _getPresence(User user) {
   if (!isOnline()) return null;
   return getRoster().getPresence(user.getName());
 }
 static Message createBaseMessage(User user, String message) {
   Message msg = new Message(user.getName(), Message.Type.CHAT);
   msg.setBody(message);
   return msg;
 }
 @Override
 public boolean hasIdeTalkClient(User user) {
   return myIDEtalkUsers.contains(user.getName());
 }
 @Override
 public boolean isSelf(User user) {
   return myFacade.isConnectedAndAuthenticated()
       && getSimpleId(myFacade.getConnection().getUser()).equals(user.getName());
 }