hubotio / hubot

A customizable life embetterment robot.

Home Page:https://hubotio.github.io/hubot/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Noticed this problem as well when trying to upgrade from 2.9.1 to 3.3.2, and using hubot-slack. In 2.9.1 I had used robot.send to send a message, capture the returned array of promises to get a handle to the message, and then post additional messages in a thread under the first message. Now this no longer works.

rajasibero opened this issue · comments

commented

Noticed this problem as well when trying to upgrade from 2.9.1 to 3.3.2, and using hubot-slack. In 2.9.1 I had used robot.send to send a message, capture the returned array of promises to get a handle to the message, and then post additional messages in a thread under the first message. Now this no longer works.
As xob explained, an easy fix here to restore the old behaviour would be to add the "return" statement in the robot.send function:

send (envelope/* , ...strings */) {
    const strings = [].slice.call(arguments, 1)

    return this.adapter.send.apply(this.adapter, [envelope].concat(strings))
  }

(and the same in robot.messageRoom)

Originally posted by @vpeltola in https://github.com/hubotio/hubot/issue_comments/504529442

Fixed with 3.4 release.