slackpost.js
function SetConfigNodeConnectionListeners(node) {
    node.clientNode.rtmClient.on("connecting", () => {
      node.status(statuses.connecting);
    });

    node.clientNode.rtmClient.on("ready", () => {
      node.status(statuses.connected);
    });

    node.clientNode.rtmClient.on("disconnected", e => {
      var status = statuses.disconnected;

      /**
       * {
       *   code: 'slackclient_platform_error',
       *   data: { ok: false, error: 'invalid_auth' }
       * }
       */
      if (e.code == "slackclient_platform_error" && e.data.ok === false) {
        status.text = e.data.error;
      }

      node.status(status);
    });

    /**
     * if connectivity is dropped we go from connected -> reconnecting
     * directly bypassing disconnected
     */
    node.clientNode.rtmClient.on("reconnecting", () => {
      node.status(statuses.disconnected);
    });
  }
function SetConfigNodeConnectionListeners(node) {
    node.clientNode.rtmClient.on("connecting", () => {
      node.status(statuses.connecting);
    });

    node.clientNode.rtmClient.on("ready", () => {
      node.status(statuses.connected);
    });

    node.clientNode.rtmClient.on("disconnected", e => {
      var status = statuses.disconnected;

      /**
       * {
       *   code: 'slackclient_platform_error',
       *   data: { ok: false, error: 'invalid_auth' }
       * }
       */
      if (e.code == "slackclient_platform_error" && e.data.ok === false) {
        status.text = e.data.error;
      }

      node.status(status);
    });

    /**
     * if connectivity is dropped we go from connected -> reconnecting
     * directly bypassing disconnected
     */
    node.clientNode.rtmClient.on("reconnecting", () => {
      node.status(statuses.disconnected);
    });
  }
function SetConfigNodeConnectionListeners ( node ) { node . clientNode . rtmClient . on ( "connecting" , ( ) => { node . status ( statuses . connecting ) ; } ) ; node . clientNode . rtmClient . on ( "ready" , ( ) => { node . status ( statuses . connected ) ; } ) ; node . clientNode . rtmClient . on ( "disconnected" , e => { var status = statuses . disconnected ; /**
       * {
       *   code: 'slackclient_platform_error',
       *   data: { ok: false, error: 'invalid_auth' }
       * }
       */ if ( e . code == "slackclient_platform_error" && e . data . ok === false ) { status . text = e . data . error ; } node . status ( status ) ; } ) ; /**
     * if connectivity is dropped we go from connected -> reconnecting
     * directly bypassing disconnected
     */ node . clientNode . rtmClient . on ( "reconnecting" , ( ) => { node . status ( statuses . disconnected ) ; } ) ; }
Common event listeners to set status indicators

@param {*} node
Common event listeners to set status indicators