How do you change your presence to show dnd/away and etc.?
XMPPPresence *presence = [XMPPPresence presenceWithType:status];
[[[self appDelegate] xmppStream] send
To change the status of your client you will need to use this simple code:
XMPPPresence *presence = [XMPPPresence presence];
NSXMLElement *status = [NSXMLElement elementWithName:@"status"];
[status setStringValue:@"online/unavailable/away/busy/invisible"];
[presence addChild:status];
[[self xmppStream] sendElement:presence];
This simply means that the key to change the status of your client is by adding a status element to your presence. Please note that the openfire server will only show the "available/Offline" status when you hover on the user icon in the admin panel. This should not confuse you though. You can simply check the presence message sent by your client and received by the others which will show on of the status you have set ("online/unavailable/away/busy/invisible").