diff options
author | FChannel <> | 2021-05-30 23:50:40 -0700 |
---|---|---|
committer | FChannel <> | 2021-05-30 23:50:40 -0700 |
commit | 13fddffc60b9cd6350e888ea4e92745a58e1f256 (patch) | |
tree | ef644acc72929f9aae114f9962558e084685bc1f /client.go | |
parent | caa24b5f43709f3201faf0eabf2ac7afcdee17f7 (diff) |
added finger methods for getting the actor
Diffstat (limited to 'client.go')
-rw-r--r-- | client.go | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -215,15 +215,17 @@ func PostGet(w http.ResponseWriter, r *http.Request, db *sql.DB){ name := GetActorFollowNameFromPath(path) followActors := GetActorsFollowFromName(actor, name) followCollection := GetActorsFollowPostFromId(db, followActors, postId) - - returnData.Board.Post.Actor = followCollection.Actor - + DeleteRemovedPosts(db, &followCollection) DeleteTombstoneReplies(&followCollection) - if len(followCollection.OrderedItems) > 0 { + if len(followCollection.OrderedItems) > 0 { returnData.Board.InReplyTo = followCollection.OrderedItems[0].Id returnData.Posts = append(returnData.Posts, followCollection.OrderedItems[0]) + + var actor Actor + actor = FingerActor(returnData.Board.InReplyTo) + returnData.Board.Post.Actor = &actor } } else { collection := GetObjectByIDFromDB(db, inReplyTo) |