setAlert( )

The setAlert API assists you to add a popup alert to modules. The input parameters are the module’s short name i.e. the folder name of the module and the number.

API:

The input parameters are the module’s short name i.e. the folder name of the module and the number.

jqcc.cometchat.setAlert('MODULENAME','NUMBER');

Sample:

function checkupdates() {
    var newupdates = 0;
    // Code to check if there have been new updates to 'home' module
    // e.g. newupdates = 5;

    if (newupdates) {
    jqcc.cometchat.setAlert('home', newupdates);
    }
}

Not finding what you need?

The CometChat team is here to help!