How to use the @cometchat-pro/chat.CometChat.GROUP_TYPE function in @cometchat-pro/chat

To help you get started, we’ve selected a few @cometchat-pro/chat examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cometchat-pro-samples / javascript-reactjs-chat-app / src / js / lib / cometchat / ccManager.js View on Github external
export default class CCManager {
  static cometchat = null;
  static appId        =   'ZZZ_CC_APPID'   ;   //Enter your App ID
  static apiKey       =   'ZZZ_CC_APIKEY'  ;  //Enter your API KEY
  static appSetting   =   new CometChat.AppSettingsBuilder().subscribePresenceForAllUsers().setRegion('eu').build();

  static LISTENER_KEY_MESSAGE = "msglistener";
  static LISTENER_KEY_USER = "userlistener";
  static LISTENER_KEY_GROUP = "grouplistener";
  static LISTENER_KEY_CALL = "calllistener";

  static GroupType = {
    'PUBLIC':CometChat.GROUP_TYPE.PUBLIC,
    'PRIVATE':CometChat.GROUP_TYPE.PRIVATE,
    'PASSWORD':CometChat.GROUP_TYPE.PASSWORD
  };
  static userRequest = null;
  static groupRequest = null;

  static init(dispatcher) {
    CometChat.init(this.appId,this.appSetting);
  }

  static getInstance() {
    if (CCManager.cometchat == null) {
      CCManager.cometchat = CometChat.init(this.appId,this.appSetting);
    }
    return CCManager.cometchat;
  }
  
  static setUserRequestBuilder(limit){
github cometchat-pro-samples / javascript-reactjs-chat-app / src / js / lib / cometchat / ccManager.js View on Github external
import {CometChat} from "@cometchat-pro/chat";
import * as actionCreator from "./../../store/actions/cc_action";

export default class CCManager {
  static cometchat = null;
  static appId        =   'ZZZ_CC_APPID'   ;   //Enter your App ID
  static apiKey       =   'ZZZ_CC_APIKEY'  ;  //Enter your API KEY
  static appSetting   =   new CometChat.AppSettingsBuilder().subscribePresenceForAllUsers().setRegion('eu').build();

  static LISTENER_KEY_MESSAGE = "msglistener";
  static LISTENER_KEY_USER = "userlistener";
  static LISTENER_KEY_GROUP = "grouplistener";
  static LISTENER_KEY_CALL = "calllistener";

  static GroupType = {
    'PUBLIC':CometChat.GROUP_TYPE.PUBLIC,
    'PRIVATE':CometChat.GROUP_TYPE.PRIVATE,
    'PASSWORD':CometChat.GROUP_TYPE.PASSWORD
  };
  static userRequest = null;
  static groupRequest = null;

  static init(dispatcher) {
    CometChat.init(this.appId,this.appSetting);
  }

  static getInstance() {
    if (CCManager.cometchat == null) {
      CCManager.cometchat = CometChat.init(this.appId,this.appSetting);
    }
    return CCManager.cometchat;
  }
github cometchat-pro-samples / javascript-reactjs-chat-app / src / js / store / actions / cc_action.js View on Github external
export const joinPasswordGroup = (group, password) => {
  return CometChat.joinGroup(
    group.guid,
    CometChat.GROUP_TYPE.PASSWORD,
    password
  );
};