begin standardizing our method of streaming lines from files

This commit is contained in:
ansuz
2020-03-04 11:38:07 -05:00
parent 35eca2c5d2
commit 32d769447a
4 changed files with 26 additions and 37 deletions

View File

@@ -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; }

View File

@@ -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