diff options
Diffstat (limited to 'lib/app.js')
-rw-r--r-- | lib/app.js | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -1334,6 +1334,26 @@ App.prototype.getLinks = function (id) { }) } +App.prototype.getLinks2 = function (id, relOrType) { + return this.sbot.backlinks ? this.sbot.backlinks.read({ + query: [ + {$filter: { + dest: id, + value: { + content: { + type: relOrType + } + } + }} + ] + }) : this.sbotLinks({ + dest: id, + meta: false, + values: true, + rel: relOrType + }) +} + App.prototype.getShard = function (id, cb) { var self = this this.getMsgDecrypted(id, function (err, msg) { |