begin standardizing our method of streaming lines from files
This commit is contained in:
@@ -204,6 +204,7 @@ Channel.isNewChannel = function (Env, channel, cb) {
|
||||
if (!Core.isValidId(channel)) { return void cb('INVALID_CHAN'); }
|
||||
if (channel.length !== 32) { return void cb('INVALID_CHAN'); }
|
||||
|
||||
// TODO replace with readMessagesBin
|
||||
var done = false;
|
||||
Env.msgStore.getMessages(channel, function (msg) {
|
||||
if (done) { return; }
|
||||
|
||||
@@ -174,6 +174,7 @@ var loadUserPins = function (Env, safeKey, cb) {
|
||||
});
|
||||
|
||||
// if channels aren't in memory. load them from disk
|
||||
// TODO replace with readMessagesBin
|
||||
Env.pinStore.getMessages(safeKey, lineHandler, function () {
|
||||
// no more messages
|
||||
|
||||
|
||||
Reference in New Issue
Block a user