From 222e7e374be558b14bd19d62767679bab04a6b3c Mon Sep 17 00:00:00 2001 From: NoobTW Date: Mon, 22 Jan 2018 00:02:31 +0800 Subject: [PATCH 1/2] fix typo in setResponseTime --- lib/MessageSink.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MessageSink.js b/lib/MessageSink.js index 7adffed..c08740a 100644 --- a/lib/MessageSink.js +++ b/lib/MessageSink.js @@ -339,7 +339,7 @@ class MessageSink { } /** * Sets the instance response_time field to the given number - * @function setUserId + * @function setResponseTime * @param {Number} responseTime - the response time of the agent to the user * message. * @chainable From 7f4fc10ff39ca6c6fc034da995a3aca97b39f401 Mon Sep 17 00:00:00 2001 From: NoobTW Date: Mon, 22 Jan 2018 00:05:15 +0800 Subject: [PATCH 2/2] setUserId should allow numbers fix #15 --- lib/MessageFactory.js | 2 +- lib/MessageSet.js | 2 +- lib/MessageSink.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/MessageFactory.js b/lib/MessageFactory.js index 98bee01..d2fb339 100644 --- a/lib/MessageFactory.js +++ b/lib/MessageFactory.js @@ -56,7 +56,7 @@ class MessageFactory { * @chainable */ setUserId (userId) { - this.user_id = userId; + this.user_id = userId.toString(); return this; } /** diff --git a/lib/MessageSet.js b/lib/MessageSet.js index fa6e497..2ef5f64 100644 --- a/lib/MessageSet.js +++ b/lib/MessageSet.js @@ -97,7 +97,7 @@ class MessageSet extends MessageFactory { * @chainable */ setUserId (userId) { - this.user_id = userId; + this.user_id = userId.toString(); return this; } /** diff --git a/lib/MessageSink.js b/lib/MessageSink.js index c08740a..7d5fcd3 100644 --- a/lib/MessageSink.js +++ b/lib/MessageSink.js @@ -334,7 +334,7 @@ class MessageSink { * @chainable */ setUserId (userId) { - this.user_id = userId; + this.user_id = userId.toString(); return this; } /**