git ssb

7+

dinoworm 🐛 / patchcore



Commit 6513733df7f7dc3466f8504069f1c20414ee1cdf

profile: filter out boxed messages

Matt McKegg committed on 6/20/2017, 4:07:59 PM
Parent: e031c60a5b1665b894adc39a070671847799cc52

Files changed

feed/pull/profile.jschanged
feed/pull/profile.jsView
@@ -1,6 +1,7 @@
11 const nest = require('depnest')
22 const extend = require('xtend')
3 +const pull = require('pull-stream')
34
45 exports.gives = nest('feed.pull.profile')
56 exports.needs = nest('sbot.pull.userFeed', 'first')
67 exports.create = function (api) {
@@ -9,8 +10,13 @@
910 return function (opts) {
1011 opts = extend(opts, {
1112 id, lt: (opts.lt && typeof opts.lt === 'object') ? opts.lt.value.sequence : opts.lt
1213 })
13- return api.sbot.pull.userFeed(opts)
14 + return pull(
15 + api.sbot.pull.userFeed(opts),
16 + pull.filter(msg => {
17 + return typeof msg.value.content !== 'string'
18 + })
19 + )
1420 }
1521 })
1622 }

Built with git-ssb-web