diff options
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' + }} + ] + }) +} |