Skip to content

Commit

Permalink
Revert: small default options modification (e991c14)
Browse files Browse the repository at this point in the history
Supported in node 6 and above and I prefer to support node 4 as well
  • Loading branch information
miki2826 committed Aug 9, 2016
1 parent e991c14 commit bb592fb
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/Botly.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,7 @@ const ACTION_TYPES = {
TYPING_OFF: 'typing_off',
};

function Botly(options = {
webHookPath: '/',
notificationType: NOTIFICATION_TYPE.REGULAR
}) {
function Botly(options) {
if (!(this instanceof Botly)) {
return new Botly(options);
}
Expand All @@ -52,8 +49,8 @@ function Botly(options = {
}
this.accessToken = options.accessToken;
this.verifyToken = options.verifyToken;
this.webHookPath = options.webHookPath;
this.notificationType = options.notificationType;
this.webHookPath = options.webHookPath || '/';
this.notificationType = options.notificationType || NOTIFICATION_TYPE.REGULAR;
EventEmitter.call(this);
}

Expand Down

0 comments on commit bb592fb

Please sign in to comment.