getActiveId( )

getActiveId API can be used to find out the User ID of the user being chatted with. Depending on your theme, the getActiveId API will return an integer value or an array. For Standard or Lite theme, the getActiveId API will return an integer data and for Facebook or Hangout theme, the getActiveId API will return an array. If the data returned is empty then the user is currently not chatting with anyone.

API:

jqcc.cometchat.getActiveId();

Sample:

var chatters_userid = jqcc.cometchat.getActiveId();

Not finding what you need?

The CometChat team is here to help!