Closed sneat closed 9 years ago
Ugh, thanks. Not quite sure but shouldn't the condition read if msg.message.user.reply_to? then
(with a question mark?). @xhochy, my coffeescript is getting rusty, can you check this please? Or maybe something like msg.message.user.reply_to || msg.message.user.room
or whatever that would look like in CoffeeScript...
Possibly. My coffeescript isn't great, so I was just doing a ternary.
Yep ||
works here as we access entries of an object.
This seems to break hubot-slack. The reply_to
is like C02EKKBLG
instead of devops
so looking up the room fails.
Yikes. Seems like either HipChat or Slack is ignoring the hubot spec somewhere (or it's rubbery enough to allow broken behaviour like this...) - but why on earth would reply_to
have a value to which you can't reply? That seems plain broken to me.
Yikes. Seems like either HipChat or Slack is ignoring the hubot spec somewhere (or it's rubbery enough to allow broken behaviour like this...) - but why on earth would reply_to have a value to which you can't reply? That seems plain broken to me.
The reply_to
value overrides the room name. The reply_to
seems to encode both the room and the user sending the message so it changes per user. When the enter
hook is triggered, it looks up the room name with no reply_to, which would, of course look different. So the flow is:
#devops
that matches regexp for telling.C02EKKBLG
) and username (parkr
)localstorage["C02EKKBLG"]["parkr"]
.#devops
. Receive EnterMessage with room devops
and username parkr
.localstorate["devops"]["parkr"]
, but nothing is there.Yeah I see what's happening in the case of Slack, I'm just wondering whether it's the hubot plugin for Slack or for HipChat that's misbehaving here, because apparently in HipChat it's exactly the other way around.
In Hipchat, the
msg.message.user.room
value referenced inrobot.enter
is different to themsg.message.user.room
value referenced inrobot.respond
.robot.respond
receives a packet like:whereas
robot.enter
receives just the '12345_stuff@conf.hipchat.com' style room name.This PR makes the script store against the '12345_stuff@conf.hipchat.com' style room name.