aboutsummaryrefslogtreecommitdiff
path: root/lib/app.js
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-09-14 08:46:07 -1000
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-09-18 21:18:29 -1000
commit00472915a4fb29399109ec9c088ab1e6a3f9b0ec (patch)
tree4b0bc076e8fda9de5dcc4bc96a51c39dce03c518 /lib/app.js
parentc8ef3a1d10fe170e6a1939bb83e6148c4bdbd72d (diff)
downloadpatchfoo-00472915a4fb29399109ec9c088ab1e6a3f9b0ec.tar.gz
patchfoo-00472915a4fb29399109ec9c088ab1e6a3f9b0ec.zip
Render npm-packages
Diffstat (limited to 'lib/app.js')
-rw-r--r--lib/app.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/app.js b/lib/app.js
index afa914f..3255851 100644
--- a/lib/app.js
+++ b/lib/app.js
@@ -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'
+ }}
+ ]
+ })
+}