How to use the hubot/es2015.CatchAllMessage function in hubot

To help you get started, we’ve selected a few hubot 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 loveonelong / hubot-telegram-better / src / telegram.js View on Github external
this.receive(new EnterMessage(user, null, message.message_id))

      // Exit event
    } else if (message.left_chat_member) {
      user = this.createUser(message.left_chat_member, message.chat)
      this.robot.logger.info(`User ${user.id} left chat ${message.chat.id}`)
      this.receive(new LeaveMessage(user, null, message.message_id))

      // Chat topic event
    } else if (message.new_chat_title) {
      user = this.createUser(message.from, message.chat)
      this.robot.logger.info(`User ${user.id} changed chat ${message.chat.id} title: ${message.new_chat_title}`)
      this.receive(new TopicMessage(user, message.new_chat_title, message.message_id))
    } else {
      message.user = this.createUser(message.from, message.chat)
      this.receive(new CatchAllMessage(message))
    }
  }