aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2019-09-03 18:10:33 -0700
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2019-09-03 18:10:33 -0700
commita6f85a3e11cb3b2be379dfcf08b2b1cc97a94da3 (patch)
treefcd39cacd6f91670eb94fe09a1685240a2aae57c /lib
parent1be957cb6289bc5f90f9a6c5eef69384406db3b0 (diff)
downloadpatchfoo-a6f85a3e11cb3b2be379dfcf08b2b1cc97a94da3.tar.gz
patchfoo-a6f85a3e11cb3b2be379dfcf08b2b1cc97a94da3.zip
mentions search: use ssb-backlinks if available
Diffstat (limited to 'lib')
-rw-r--r--lib/app.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/app.js b/lib/app.js
index 04ad487..c65552e 100644
--- a/lib/app.js
+++ b/lib/app.js
@@ -214,7 +214,17 @@ App.prototype.advancedSearch = function (opts) {
reverse: true,
})
: opts.dest ?
- this.sbot.links({
+ this.sbot.backlinks ? this.sbot.backlinks.read({
+ reverse: true,
+ query: [
+ {$filter: {
+ dest: opts.dest,
+ value: {
+ author: opts.source || undefined
+ }
+ }}
+ ]
+ }) : this.sbotLinks({
values: true,
dest: opts.dest,
source: opts.source || undefined,