git ssb

7+

dinoworm 🐛 / patchcore



Commit e3cbdbaf0af7ab84de76704d47c517a5e21cc5e2

Pass msg.sync type messages through to mutant-pull-reduce.

Gordon Martin committed on 12/15/2017, 12:01:11 AM
Parent: 7ce1851294fbc4a8477cf9fb394510782f4d76b4

Files changed

backlinks/obs-filter.jschanged
backlinks/obs-filter.jsView
@@ -46,9 +46,13 @@
4646 var filterFunction = opts && opts.filter ? opts.filter : () => true
4747
4848 var filteredBacklinks = pull(
4949 msgBacklinks,
50- pull.filter(filterFunction)
50 + // We need to allow 'msg.sync' even if the supplied filter function does not
51 + // match it to allow mutant-pull-reduce to handle it for us and set the
52 + // 'sync' observable to indicate that the list is up to date with the messages
53 + // received so far.
54 + pull.filter(msg => msg.sync || filterFunction(msg))
5155 )
5256
5357 var backlinksObs = MutantPullReduce(filteredBacklinks, (state, msg) => {
5458 state.push(msg)

Built with git-ssb-web