git ssb

30+

cel / git-ssb-web



Commit f2a29c8443af6d8b2826e9119cc208e19479f015

wip git index

noffle committed on 5/11/2018, 5:33:14 AM
Parent: 9c3452530e296365dce5b439655e7ae70f4d1f44

Files changed

index.jschanged
index.jsView
@@ -587,18 +587,33 @@
587587 var opts = {
588588 reverse: !query.forwards,
589589 lt: query.lt && +query.lt || Date.now(),
590590 gt: query.gt ? +query.gt : -Infinity,
591 + values: true,
591592 id: feedId
592593 }
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 +
593607 return pull(
594- feedId ? this.ssb.createUserStream(opts) : this.ssb.createFeedStream(opts),
608 + source,
595609 u.decryptMessages(this.ssb),
596610 u.readableMessages(),
597611 pull.filter(function (msg) {
598612 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
601616 }),
602617 typeof filter == 'function' ? filter(opts) : filter,
603618 pull.take(100),
604619 this.addAuthorName(),

Built with git-ssb-web