Fixed attempt of parsing Msg objects
This commit is contained in:
parent
b5fba69545
commit
5a8b660d73
|
@ -257,7 +257,7 @@ Client.prototype.more = function(data) {
|
|||
chan.messages.fetch(Math.max(0, count - 100), count, function(err, messages){
|
||||
client.emit("more", {
|
||||
chan: chan.id,
|
||||
messages: messages.map(log.parse)
|
||||
messages: messages
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
var util = require("util");
|
||||
var _ = require("lodash");
|
||||
var Helper = require("../helper");
|
||||
var log = require("../log");
|
||||
|
||||
module.exports = Chan;
|
||||
|
||||
|
@ -38,7 +39,7 @@ MessageArray.prototype.fetch = function(from, to, callback) {
|
|||
else if (this.log) {
|
||||
var linesFrom = from + messages.length;
|
||||
Helper.getLines(this.log, linesFrom, to, function(err, lines){
|
||||
callback(null, messages.concat(lines));
|
||||
callback(null, messages.concat(lines.map(log.parse)));
|
||||
});
|
||||
}
|
||||
else callback(null, messages);
|
||||
|
|
Loading…
Reference in New Issue