Skip to content
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

Doesn't crash the RTM client if a message with a reply_to ID with n… #227

Merged
1 commit merged into from
May 27, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### v3.3.1 (2016-05-26)

* Doesn't crash the RTM client if a message with a `reply_to` ID with no response handler is received

### v3.3.0 (2016-05-24)

* Creates a memory data store by default if an undefined, but not false|null value is passed for `opts.dataStore`
Expand Down
5 changes: 5 additions & 0 deletions lib/clients/rtm/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,11 @@ RTMClient.prototype._handleMsgResponse = function _handleMsgResponse(msgId, err,
this.logger('debug', 'Error sending message: ' + err);
}

if (!responseHandler) {
this.logger('debug', 'no response handler for message ID: ' + msgId);
return;
}

if (isFunction(responseHandler)) {
responseHandler(err, res);
} else {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@slack/client",
"version": "3.3.0",
"version": "3.3.1",
"description": "A library for creating a Slack client",
"main": "./index",
"scripts": {
Expand Down