diff options
author | FChannel <=> | 2021-01-23 22:37:20 -0800 |
---|---|---|
committer | FChannel <=> | 2021-01-23 22:37:20 -0800 |
commit | 2ca021e2c6599b39e6225fdbd449093517a34418 (patch) | |
tree | de65bb297a63765f4e471ddd488975466e438df1 /outboxGet.go | |
parent | 000c206417a91d0f910cba35d16d433a1f038530 (diff) |
caching progress
Diffstat (limited to 'outboxGet.go')
-rw-r--r-- | outboxGet.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/outboxGet.go b/outboxGet.go index 8eec74e..8c178a2 100644 --- a/outboxGet.go +++ b/outboxGet.go @@ -23,15 +23,13 @@ func GetActorOutbox(w http.ResponseWriter, r *http.Request, db *sql.DB) { w.Write(enc) } -func GetObjectsFromFollow(actor Actor) []ObjectBase { +func GetObjectsFromFollow(db *sql.DB, actor Actor) []ObjectBase { var followingCol Collection var followObj []ObjectBase followingCol = GetActorCollection(actor.Following) for _, e := range followingCol.Items { var followOutbox Collection - var actor Actor - actor = GetActor(e.Id) - followOutbox = GetActorCollection(actor.Outbox) + followOutbox = GetObjectFromCache(db, e.Id) for _, e := range followOutbox.OrderedItems { followObj = append(followObj, e) } |