Project

General

Profile

If there's a way to get only one user online_statu by HTTP API

liu zeyuan
Added over 4 years ago

If there's a way to get a user online status by HTTP API,

I have readed the document,and did not find the method,

I don't want to check the database-->user table-->online_status, because sometimes it is >0 and user is not online


Replies (2)

Added by Wojciech Kapcia TigaseTeam over 4 years ago

Database is not reliable way to check for the status.

You can use admin ad-hoc script to get user status. In terms of http api component it would be a POST call to /rest/adhoc/sess-man@domain.com with following:

<command>
  <node>http://jabber.org/protocol/admin#user-stats</node>
  <fields>
    <item>
      <var>accountjid</var>
      <value>user_jid@domain.com</value>
    </item>
  </fields>
</command>

Added by liu zeyuan over 4 years ago

thanks

    (1-2/2)