RocketChat / hubot-rocketchat

Rocket.Chat Hubot adapter
MIT License
578 stars 227 forks source link

AttachmentMessage toString method bug #327

Open ihailong opened 5 years ago

ihailong commented 5 years ago

note the toString method, it returns attachment which type is object, this wll crash hubot debug output, fix it pls.

/** Define new message type for handling attachments */ class AttachmentMessage extends TextMessage { constructor (user, attachment, text, id) { super(user, text, id) this.user = user this.attachment = attachment this.text = text this.id = id } toString () { return this.attachment } }