|
|
@@ -598,7 +598,7 @@ Slack.prototype.editMsg = function(channel, msgId, text) {
|
|
|
/**
|
|
|
* @param {SlackChan|SlackGroup|SlackIms} target
|
|
|
**/
|
|
|
-Slack.prototype.fetchHistory = function(target, cb) {
|
|
|
+Slack.prototype.fetchHistory = function(target, cb, count) {
|
|
|
var _this = this
|
|
|
,baseUrl = ""
|
|
|
,targetId = target.remoteId;
|
|
|
@@ -613,9 +613,10 @@ Slack.prototype.fetchHistory = function(target, cb) {
|
|
|
httpsRequest(baseUrl
|
|
|
+"?token="+this.token
|
|
|
+"&channel=" +targetId
|
|
|
- +"&count=" +HISTORY_LENGTH,
|
|
|
+ +"&count=" +(count || 100),
|
|
|
(status, resp) => {
|
|
|
var history = [];
|
|
|
+ console.log(count || 100);
|
|
|
if (status === 200 && resp && resp.ok) {
|
|
|
var histo = this.history[target.id];
|
|
|
if (!histo)
|