aboutsummaryrefslogtreecommitdiff
path: root/client.go
diff options
context:
space:
mode:
Diffstat (limited to 'client.go')
-rw-r--r--client.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/client.go b/client.go
index 97222d1..cfa6b7f 100644
--- a/client.go
+++ b/client.go
@@ -224,12 +224,13 @@ func PostGet(w http.ResponseWriter, r *http.Request, db *sql.DB){
}
} else {
collection := GetObjectByIDFromDB(db, inReplyTo)
+ if collection.Actor != nil {
+ returnData.Board.Post.Actor = collection.Actor.Id
+ returnData.Board.InReplyTo = inReplyTo
- returnData.Board.Post.Actor = collection.Actor.Id
- returnData.Board.InReplyTo = inReplyTo
-
- if len(collection.OrderedItems) > 0 {
- returnData.Posts = append(returnData.Posts, collection.OrderedItems[0])
+ if len(collection.OrderedItems) > 0 {
+ returnData.Posts = append(returnData.Posts, collection.OrderedItems[0])
+ }
}
}