-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
robot messageRoom does not working #4
Comments
This is a bug, thanks for reporting. The adapter should check if there's a user, before checking properties of the user. e.g. at https://github.com/RocketChat/hubot-rocketchat/blob/master/index.js#L146 - should be I will fix this in the adapter asap. But for now, you can include an empty user in your envelope and call the send from the adapter directly which should satisfy the condition... module.exports = function(robot) {
robot.router.post('/hubot/hoge/:room', function(req, res) {
let room = req.params.room
data = req.body.payload
robot.adapter.send({ room, user: {} }, 'hoge Posted!')
res.send('OK')
})
} Please try that and comment if it works or not. |
Thank you for your reply. |
Great. I'll just leave this open though until we've address the bug handling |
I'm using Google's translation application...
I have failed to call "robot.messageRoom":
Error Message:
/hubot-rocketchat-boilerplate/node_modules/hubot-rocketchat/index.js:155:25
If this is done as below it will work normally
What are the reasons why 'roomID' can not be recognized?
Please advise me.
regards.
The text was updated successfully, but these errors were encountered: