My Account | Buy CometChat

documentation

getActiveId()

getActiveId() can be used to find out the User ID of the user being chatted with.

The API

The getActiveId() function will return an integer data. If the data returned is 0 then the user is currently not chatting with anyone.

var chatters_userid = jqcc.cometchat.getActiveId();

Sample Code

jqcc(document).ready(function() {
    alert(jqcc.cometchat.getActiveId());
})