Skip to content

is Response.envelope really needed? #1780

@joeyguerra

Description

@joeyguerra

class Response {
// Public: Responses are sent to matching listeners. Messages know about the
// content and user that made the original message, and how to reply back to
// them.
//
// robot - A Robot instance.
// message - A Message instance.
// match - A Match object from the successful Regex match.
constructor (robot, message, match) {
this.robot = robot
this.message = message
this.match = match
this.envelope = {
room: this.message.room,
user: this.message.user,
message: this.message
}
}

What is the purpose of envelope here if message already contains the information?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions