diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-09-14 08:46:07 -1000 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-09-18 21:18:29 -1000 |
commit | 00472915a4fb29399109ec9c088ab1e6a3f9b0ec (patch) | |
tree | 4b0bc076e8fda9de5dcc4bc96a51c39dce03c518 /lib/app.js | |
parent | c8ef3a1d10fe170e6a1939bb83e6148c4bdbd72d (diff) | |
download | patchfoo-00472915a4fb29399109ec9c088ab1e6a3f9b0ec.tar.gz patchfoo-00472915a4fb29399109ec9c088ab1e6a3f9b0ec.zip |
Render npm-packages
Diffstat (limited to 'lib/app.js')
-rw-r--r-- | lib/app.js | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -545,3 +545,21 @@ App.prototype.streamPrivate = function (opts) { pull.take(opts.limit) ) } + +App.prototype.blobMentions = function (opts) { + if (!this.sbot.links2) return pull.error(new Error( + 'missing ssb-links plugin')) + return this.sbot.links2.read({ + query: [ + {$filter: {rel: ['mentions', opts.name]}}, + {$filter: {dest: {$prefix: '&'}}}, + {$map: { + name: ['rel', 1], + size: ['rel', 2], + link: 'dest', + author: 'source', + time: 'ts' + }} + ] + }) +} |