Sends status message with unavailable presence when logging off, this way the status will be available and when offline.

cusax-fix
Damian Minkov 14 years ago
parent b5291be072
commit 9cf32899ba

@ -1353,7 +1353,22 @@ private void disconnectAndCleanConnection()
// that maybe added even if its not connected
try
{
connection.disconnect();
OperationSetPersistentPresenceJabberImpl opSet =
(OperationSetPersistentPresenceJabberImpl)
this.getOperationSet(OperationSetPersistentPresence.class);
Presence unavailablePresence =
new Presence(Presence.Type.unavailable);
if(opSet != null
&& !net.java.sip.communicator.util.StringUtils
.isNullOrEmpty(opSet.getCurrentStatusMessage()))
{
unavailablePresence.setStatus(
opSet.getCurrentStatusMessage());
}
connection.disconnect(unavailablePresence);
} catch (Exception e)
{}

Loading…
Cancel
Save