var pull = require('pull-stream') module.exports = function (opts) { var sbot = this.sbot, api = this.api return ['div.Gatherings', ['title', 'Gatherings'], pull( sbot.query.read({ query: [{$filter:{ value: {content: {type: 'gathering'}}, author: opts.author, }}], limit: 30, reverse: true }), pull.map(function (data) { return api.gathering({ id: data.key, private: !!opts.private, }) }) ) ] }