reinitialize( )

The reinitialize API assists you to reload CometChat.
If you have placed your site inside an iFrame or you perform login using AJAX, then the CometChat bar will still show the user as not logged in. In order to login the user without refreshing the window, you can use this function.

API:

jqcc.cometchat.reinitialize();

Sample:

If you have placed your site inside an iFrame or you perform login using AJAX, then the CometChat bar will still show the user as not logged in. In order to login the user without refreshing the window, you can use this function.

function onlogincomplete() {
    jqcc.cometchat.reinitialize();
}

Not finding what you need?

The CometChat team is here to help!