async unsubscribeToChats(unsubscribeFunction) {
    if (typeof unsubscribeFunction !== 'function') {
      throw new ChatError('invalid-unsubscribe-function', 'only can unsubscribe using a function');
    }

    unsubscribeFunction();
  }
/**
   * Unsubscribe from chats. Able to unsubscribe to chat belonging to a user and well as a user post
   * @param {function} unsubscribeFunction The function to unsubscribe to. It is the function that is returned when subscribing to the chat messages
   * @throws {ChatError}
   */
Unsubscribe from chats. Able to unsubscribe to chat belonging to a user and well as a user post
@param {function} unsubscribeFunction The function to unsubscribe to. It is the function that is returned when subscribing to the chat messages
@throws {ChatError}
Unsubscribe from chats . Able to unsubscribe to chat belonging to a user and well as a user post @param { function } unsubscribeFunction The function to unsubscribe to . It is the function that is returned when subscribing to the chat messages @throws { ChatError }
async unsubscribeToChats(unsubscribeFunction) {
    if (typeof unsubscribeFunction !== 'function') {
      throw new ChatError('invalid-unsubscribe-function', 'only can unsubscribe using a function');
    }
    unsubscribeFunction();
  }
async unsubscribeToChats ( unsubscribeFunction ) { if ( typeof unsubscribeFunction !== 'function' ) { throw new ChatError ( 'invalid-unsubscribe-function' , 'only can unsubscribe using a function' ) ; } unsubscribeFunction ( ) ; }
Unsubscribe from chats.
Unsubscribe from chats .