diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2020-01-28 10:21:49 -0500 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2020-01-28 10:21:49 -0500 |
commit | 97da1aee50af959838fdaed3b85eb4fb47627ff0 (patch) | |
tree | 65559cea179afbc608dca79748d1a07debeedfbe /lib/app.js | |
parent | a36543131c127121355391b4c743f49b7280b2aa (diff) | |
download | patchfoo-97da1aee50af959838fdaed3b85eb4fb47627ff0.tar.gz patchfoo-97da1aee50af959838fdaed3b85eb4fb47627ff0.zip |
Optimize /about-diff
- Include rel/type in links query
- Query only own messages for self-about (unless fromAny=1)
Diffstat (limited to 'lib/app.js')
-rw-r--r-- | lib/app.js | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -1337,7 +1337,7 @@ App.prototype.getLinks = function (id) { }) } -App.prototype.getLinks2 = function (id, relOrType) { +App.prototype.getLinksBy = function (id, relOrType) { return this.sbot.backlinks ? this.sbot.backlinks.read({ query: [ {$filter: { @@ -1357,6 +1357,16 @@ App.prototype.getLinks2 = function (id, relOrType) { }) } +App.prototype.getLinks3 = function (id, author, rel) { + return this.sbotLinks({ + dest: id, + source: author, + rel: rel, + meta: false, + values: true + }) +} + App.prototype.getShard = function (id, cb) { var self = this this.getMsgDecrypted(id, function (err, msg) { |