From 13fddffc60b9cd6350e888ea4e92745a58e1f256 Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Sun, 30 May 2021 23:50:40 -0700 Subject: added finger methods for getting the actor --- client.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'client.go') diff --git a/client.go b/client.go index 1ef6250..6ca3ee0 100644 --- a/client.go +++ b/client.go @@ -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) -- cgit v1.2.3