Set Presence not working!

Hi, can someone tell be why this method is not working to send the presence info?

public void setStatus()

{

String status = away.status.getText();

Presence presence = new Presence(Presence.Type.SUBSCRIBED);

presence.setMode (Presence.Mode.AWAY);

presence.setStatus (status);

connection.sendPacket (presence);

}

Dilip,

It should be:

Presence presence = new Presence(Presence.Type.AVAILABLE);

Presence.Type.SUBSCRIBED is not what you want to be using.

Regards,

Matt