aboutsummaryrefslogtreecommitdiff
path: root/client.go
diff options
context:
space:
mode:
Diffstat (limited to 'client.go')
-rw-r--r--client.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/client.go b/client.go
index 976eb31..d62c26f 100644
--- a/client.go
+++ b/client.go
@@ -56,6 +56,7 @@ type AdminPage struct {
Followers []string
Reported []Report
Domain string
+ IsLocal bool
}
type Report struct {
@@ -396,11 +397,16 @@ func WantToServe(db *sql.DB, actorName string) (Collection, bool) {
if boardActor.Id == "" {
boardActor = GetActor(e.Id)
}
-
- if boardActor.Id == actorName {
+
+ if boardActor.Name == actorName {
serve = true
- collection = GetActorCollection(boardActor.Outbox)
+ if IsActorLocal(db, boardActor.Id) {
+ collection = GetActorCollectionDB(db, boardActor)
+ } else {
+ collection = GetActorCollectionCache(db, boardActor)
+ }
collection.Actor = &boardActor
+ return collection, serve
}
}