Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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))
}
}