- changed status to resolved
Sassy ignoring slash commands from other bots?
Issue #24
resolved
I've got a basic atlassian-connect-express bot. It has a web hook to listen for a particular pattern and send back a "/gif foo" message to the room where Sassy is listening. The hook is working and my bot's sending back the slash command. However, Sassy is ignoring the slash command. It works fine if I manually type the same command into the room as a user.
Is there a particular way I need to format my message? This is the JS I'm using...I started without sending any custom options, but decided to try setting it to text and to notify, but that didn't change anything.
app.post('/webhook',
addon.authenticate(),
function (req, res) {
var opts = { 'options': { 'format': 'text', 'notify': true } };
hipchat.sendMessage(req.clientInfo, req.identity.roomId, '/gif middle finger', opts)
.then(function (data) {
res.sendStatus(200);
});
}
);
Comments (2)
-
Account Deactivated -
reporter Thanks for the fast and informative response, Bob! Much appreciated :)
Cheers!
- Log in to comment
This is really a limitation of how HipChat webhooks work, rather than problem with Sassy per se -- the
room_message
webhook doesn't match/trigger from room notifications. If you want to Sassy to respond to /commands from other bots, it would have to be updated to listen to allroom_notification
webhooks and then do it's own filtering on those messages to determine if there was a notifcation message match that it should respond to.