Fixed small issue in getChannelLogs

Now also returns the last message and not the penultimate as the latest
This commit is contained in:
hydrabolt
2015-08-12 12:13:17 +01:00
parent ddf74b76d8
commit 4af5353bdf

View File

@@ -71,7 +71,7 @@ exports.Client.prototype.cacheServer = function(id, cb, members) {
}
exports.Client.prototype.login = function(email, password, cb) {
exports.Client.prototype.login = function(email, password) {
var client = this;
@@ -274,7 +274,7 @@ exports.Client.prototype.channelFromId = function(id){
exports.Client.prototype.getChannelLogs = function(channel, amount, cb){
amount = amount+1 || 0;
amount = amount || 0;
var client = this;
request
@@ -293,8 +293,6 @@ exports.Client.prototype.getChannelLogs = function(channel, amount, cb){
datList.add( new Message(item, channel) );
}
datList.removeIndex(0);
cb(datList);
});