We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
undefined
bot.postMessageToChannel('channelname', "Some message", params) .then(function(data) { console.log("slack data", data); return data; });
data should be the information regarding the posted message, right? But currently I'm just receiving undefined.
data
I've reviewed the code, and it seems the callback checker is hijacking the return value in https://github.com/mishk0/slack-bot-api/blob/master/index.js#L388-L394
After adding an else { return data.value; } to handle the case where cb is not defined it works for me:
else { return data.value; }
cb
return this[method](name).then(function(itemId) { return this.postMessage(itemId, text, params); }.bind(this)).always(function(data) { if (cb) { cb(data._value); + }else{ + return data._value; + } });
The text was updated successfully, but these errors were encountered:
It might be slightly related to #37 except that the message gets posted here successfully. Just the return value in the promise is missing.
Sorry, something went wrong.
No branches or pull requests
data
should be the information regarding the posted message, right? But currently I'm just receivingundefined
.I've reviewed the code, and it seems the callback checker is hijacking the return value in https://github.com/mishk0/slack-bot-api/blob/master/index.js#L388-L394
After adding an
else { return data.value; }
to handle the case wherecb
is not defined it works for me:The text was updated successfully, but these errors were encountered: