Skip to content

Commit

Permalink
Adding junk param to prevent logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurent Landowski authored Dec 11, 2017
1 parent b05a425 commit fb4d8ff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/wit.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function Wit(opts) {

this._sessions = {};

this.message = (message, context, n, verbose) => {
this.message = (message, context, n, verbose, junk) => {
let qs = 'q=' + encodeURIComponent(message);
if (context) {
qs += '&context=' + encodeURIComponent(JSON.stringify(context));
Expand All @@ -32,6 +32,9 @@ function Wit(opts) {
if (verbose != null) {
qs += '&verbose=' + encodeURIComponent(JSON.stringify(verbose));
}
if (junk != null) {
qs += '&junk=true');
}
const method = 'GET';
const fullURL = witURL + '/message?' + qs
const handler = makeWitResponseHandler(logger, 'message');
Expand Down

0 comments on commit fb4d8ff

Please sign in to comment.