diff options
author | FChannel <=> | 2021-01-23 13:53:25 -0800 |
---|---|---|
committer | FChannel <=> | 2021-01-23 13:53:25 -0800 |
commit | 000c206417a91d0f910cba35d16d433a1f038530 (patch) | |
tree | 19cf45955dffbb6caaef6ef7a339d671c6aaf596 /client.go | |
parent | 2566e314e8351ffbceae9a2688d90a5c811d49e5 (diff) |
foundation for cache retrieval
Diffstat (limited to 'client.go')
-rw-r--r-- | client.go | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -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 } } |