String status = mMyPresence.getStatus(); try { setMyPresence(null, new IMPresence(Show.ONLINE, (byte)1,status)); } catch(ServiceException e) { ZimbraLog.im.debug("ServiceException when going offline", e); }
mIsOnline = true;
    public synchronized void addListener(Session session) {        if (mListeners.size() == 0) {            String status = mMyPresence.getStatus();            try {                setMyPresence(null, new IMPresence(Show.ONLINE, (byte)1,status));            } catch(ServiceException e) {                ZimbraLog.im.debug("ServiceException when going offline", e);            }        }        mListeners.add(session);    }