transform and pass through the existing store
This commit is contained in:
parent
a08efc568b
commit
061cffe462
@ -8,11 +8,12 @@ var create = module.exports.create = function(filePath, backingStore) {
|
|||||||
|
|
||||||
var file = Fs.createWriteStream(filePath, {flags: 'a+'});
|
var file = Fs.createWriteStream(filePath, {flags: 'a+'});
|
||||||
|
|
||||||
return {
|
var originalMessageFunction = backingStore.message;
|
||||||
message: function(channel, msg, callback) {
|
|
||||||
message(file, msg);
|
backingStore.message = function(channel, msg, callback) {
|
||||||
backingStore.message(channel, msg, callback);
|
message(file, msg);
|
||||||
},
|
originalMessageFunction(channel, msg, callback);
|
||||||
getMessages: backingStore.getMessages
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
return backingStore;
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user