aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/app.js12
-rw-r--r--lib/serve.js6
2 files changed, 15 insertions, 3 deletions
diff --git a/lib/app.js b/lib/app.js
index d0ff7f4..c841ab0 100644
--- a/lib/app.js
+++ b/lib/app.js
@@ -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) {
diff --git a/lib/serve.js b/lib/serve.js
index 5736f9b..562476d 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -4033,7 +4033,7 @@ Serve.prototype.composer = function (opts, cb) {
if (!canMentionAttendees) return cb(null)
if (opts.id === opts.root) gotLinks(null, links)
else pull(
- self.app.getLinks2(opts.root, 'about'),
+ self.app.getLinksBy(opts.root, 'about'),
pull.unique('key'),
self.app.unboxMessages(),
pull.collect(gotLinks)
@@ -4375,7 +4375,9 @@ Serve.prototype.aboutDiff = function (url) {
function next(rootId, msg, cb) {
pull(
- self.app.getLinks(rootId),
+ rootId === msg.value.author && !self.query.fromAny ?
+ self.app.getLinks3(rootId, msg.value.author, 'about') :
+ self.app.getLinksBy(rootId, 'about'),
pull.unique('key'),
self.app.unboxMessages(),
pull.collect(function (err, links) {