Commit f2a29c8443af6d8b2826e9119cc208e19479f015
wip git index
noffle committed on 5/11/2018, 5:33:14 AMParent: 9c3452530e296365dce5b439655e7ae70f4d1f44
Files changed
index.js | changed |
index.js | |||
---|---|---|---|
@@ -587,18 +587,33 @@ | |||
587 | 587 … | var opts = { | |
588 | 588 … | reverse: !query.forwards, | |
589 | 589 … | lt: query.lt && +query.lt || Date.now(), | |
590 | 590 … | gt: query.gt ? +query.gt : -Infinity, | |
591 … | + values: true, | ||
591 | 592 … | id: feedId | |
592 | 593 … | } | |
594 … | + console.log('opts', opts) | ||
595 … | + | ||
596 … | + // use git index, if present | ||
597 … | + var source | ||
598 … | + if (this.ssb.git) { | ||
599 … | + source = pull( | ||
600 … | + feedId ? this.ssb.git.author(opts) : this.ssb.git.read(opts), | ||
601 … | + pull.map(function (msg) { return msg.value }), | ||
602 … | + ) | ||
603 … | + } else { | ||
604 … | + source = feedId ? this.ssb.createUserStream(opts) : this.ssb.createFeedStream(opts) | ||
605 … | + } | ||
606 … | + | ||
593 | 607 … | return pull( | |
594 | - feedId ? this.ssb.createUserStream(opts) : this.ssb.createFeedStream(opts), | ||
608 … | + source, | ||
595 | 609 … | u.decryptMessages(this.ssb), | |
596 | 610 … | u.readableMessages(), | |
597 | 611 … | pull.filter(function (msg) { | |
598 | 612 … | var c = msg.value.content | |
599 | - return c.type in msgTypes | ||
600 | - || (c.type == 'post' && c.repo && c.issue) | ||
613 … | + var keep = c.type in msgTypes || (c.type == 'post' && c.repo && c.issue) | ||
614 … | + // process.stdout.write(keep ? '+' : '.') | ||
615 … | + return keep | ||
601 | 616 … | }), | |
602 | 617 … | typeof filter == 'function' ? filter(opts) : filter, | |
603 | 618 … | pull.take(100), | |
604 | 619 … | this.addAuthorName(), |
Built with git-ssb-web