diff --git a/lib/wit.js b/lib/wit.js index 73a6c10..9a82e3b 100644 --- a/lib/wit.js +++ b/lib/wit.js @@ -41,11 +41,14 @@ function Wit(opts) { this._sessions = {}; - this.message = (message, context, n, verbose, junk) => { + this.message = (message, context, n, verbose, junk, msgId) => { let qs = 'q=' + encodeURIComponent(message); if (context) { qs += '&context=' + encodeURIComponent(JSON.stringify(context)); } + if (msgId) { + qs += `&msg_id=${encodeURIComponent(msgId)}`; + } if (typeof n === 'number') { qs += '&n=' + encodeURIComponent(JSON.stringify(n)); }