aboutsummaryrefslogtreecommitdiff
path: root/lib/app.js
diff options
context:
space:
mode:
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'
+ }}
+ ]
+ })
+}