title: openfire server for iOS chat app
body: <p>I'm doing an iPhone chat app - using an openfire chat server.</p>
  
  <p>How would you communicate with the openfire server to achieve BOTH:</p>
  
  <ol>
  <li>find out if the receiving user is currently online or not (connected to openfire xmpp server or not) - which determines if we do a push notification or further action to an offline user</li>
  </ol>
  
  <p>AND</p>
  
  <ol>
  <li>send the message contents to the receiving user</li>
  </ol>
  
  <p>... WITHOUT doing two calls?</p>
  
  <p>How can you do it in ONE call/request?</p>
  
  <p>Any insights are appreciated! Any way to hack the openfire server?</p>