Well thats weird.
I tought that came from the private server I use, but I tried this on jabber.com.
I have the same problem.
When I say that the status returned is always UNAVAILABLE, I mean that if I have a user A and a user B.
On both, I have a PresenceListener.
when A gets away and back to available, B receives correct notification.
When A gets unavailable, B receives the correct notification.
But when A gets back to AWAY or available, B keeps on receiving an UNAVAILABLE notification.
My code is quite simple.
AMong others, I have the following methods:
public boolean setAWAY(String awayText ){
this.presence.setMode( Presence.Mode.AWAY );
this.presence.setStatus( awayText );
this.connection.sendPacket(this.presence);
return true;
}
public boolean setAVAILABLE ( String msg ){
this.presence.setMode( Presence.Mode.AVAILABLE );
this.presence.setStatus( msg );
this.connection.sendPacket( this.presence );
return true;
}
public boolean setUNAVAILABLE( String msg ){
this.presence.setType( Presence.Type.UNAVAILABLE );
this.presence.setStatus( msg );
this.connection.sendPacket( this.presence );
return true;
}
So I don’'t understand where is the problem.
I also have an invisible mode that has no effect:
this.presence.setMode( Presence.Mode.INVISIBLE );
this.presence.setStatus(msg);
this.connection.sendPacket( this.presence );
The connection is still on.