aboutsummaryrefslogtreecommitdiff
path: root/lib/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/app.js')
-rw-r--r--lib/app.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/app.js b/lib/app.js
index 9cc80e4..0eb576e 100644
--- a/lib/app.js
+++ b/lib/app.js
@@ -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) {