aboutsummaryrefslogtreecommitdiff
path: root/client.go
diff options
context:
space:
mode:
authorFChannel <>2021-05-30 23:50:40 -0700
committerFChannel <>2021-05-30 23:50:40 -0700
commit13fddffc60b9cd6350e888ea4e92745a58e1f256 (patch)
treeef644acc72929f9aae114f9962558e084685bc1f /client.go
parentcaa24b5f43709f3201faf0eabf2ac7afcdee17f7 (diff)
added finger methods for getting the actor
Diffstat (limited to 'client.go')
-rw-r--r--client.go10
1 files changed, 6 insertions, 4 deletions
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)