Comparing version 0.2.1 to 0.2.2
{ | ||
"name": "ferd", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "A modular slackbot", | ||
"main": "index.js", | ||
"author": { | ||
"name": "Timothy Quach" | ||
}, | ||
"author": "Timothy Quach", | ||
"license": "ISC", | ||
@@ -13,28 +11,3 @@ "dependencies": { | ||
"slack-client": "^1.4.1" | ||
}, | ||
"scripts": { | ||
"start": "node server.js" | ||
}, | ||
"gitHead": "fbb0e0b567a7c94db1e62b1ce6cf7ea91612846c", | ||
"_id": "ferd@0.2.0", | ||
"_shasum": "5f2b5060ef6e6114edb5b7a19c5bb93338bd7db4", | ||
"_from": "ferd@>=0.2.0 <0.3.0", | ||
"_npmVersion": "2.11.3", | ||
"_nodeVersion": "0.12.7", | ||
"_npmUser": { | ||
"name": "timothyquach", | ||
"email": "timothyquachbot@gmail.com" | ||
}, | ||
"dist": { | ||
"shasum": "5f2b5060ef6e6114edb5b7a19c5bb93338bd7db4", | ||
"tarball": "http://registry.npmjs.org/ferd/-/ferd-0.2.0.tgz" | ||
}, | ||
"maintainers": [ | ||
{ | ||
"name": "timothyquach", | ||
"email": "timothyquachbot@gmail.com" | ||
} | ||
], | ||
"directories": {}, | ||
"_resolved": "https://registry.npmjs.org/ferd/-/ferd-0.2.0.tgz" | ||
} | ||
} |
@@ -27,4 +27,4 @@ var Slack = require('slack-client'); | ||
var self = this; | ||
rx.Observable.fromEvent(this.slack, 'open') | ||
.subscribe(() => self.setUp()); | ||
this.slack.on('open', () => self.setUp() ); | ||
this.slack.on('error', (reason, code) => console.log('socket error: reason ' + reason + ', code ' + code) ); | ||
this.slack.login(); | ||
@@ -31,0 +31,0 @@ this.messages = this.createMessageStream(); |
@@ -11,3 +11,3 @@ var ResponseFactory = function(trigger, message, slack) { | ||
this.slack = slack; | ||
this.match = match; | ||
this.match = match | ||
}; | ||
@@ -26,12 +26,2 @@ | ||
/** | ||
* Posts message to same channel | ||
* @param {obj} response A message object | ||
*/ | ||
Response.prototype.postMessage = function(response) { | ||
var channelId = this.message.channel; | ||
var channel = this.getChannelGroupOrDMByID(channelId); | ||
channel.postMessage(response); | ||
}; | ||
/** | ||
* Returns Slack User object | ||
@@ -65,3 +55,3 @@ * https://api.slack.com/types/user | ||
return this.slack.getChannelGroupOrDMByID(id); | ||
}; | ||
} | ||
@@ -68,0 +58,0 @@ /** |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
32914
8
1241