aboutsummaryrefslogtreecommitdiff
path: root/client.go
diff options
context:
space:
mode:
authorFChannel <>2021-06-24 23:45:18 -0700
committerFChannel <>2021-06-24 23:45:18 -0700
commitef7eb7330018c84a44fb24711982c25f51749d2e (patch)
tree8da97fce2dad238b994eede1f0b9ce2bf9b3a7ff /client.go
parentb4f7d00ad9d13f96323366ded2eb7702e37f6e52 (diff)
changed activitystream formating for objects to better align with pleromas actor field
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 1c3ae93..91f5f1f 100644
--- a/client.go
+++ b/client.go
@@ -89,7 +89,8 @@ func IndexGet(w http.ResponseWriter, r *http.Request, db *sql.DB) {
data.Board.Domain = Domain
data.Board.ModCred, _ = GetPasswordFromSession(r)
data.Board.Actor = actor
- data.Board.Post.Actor = &actor
+ data.Board.Post.Actor = actor.Id
+ data.Board.Restricted = actor.Restricted
t.ExecuteTemplate(w, "layout", data)
}
@@ -117,7 +118,7 @@ func OutboxGet(w http.ResponseWriter, r *http.Request, db *sql.DB, collection Co
returnData.Board.Restricted = actor.Restricted
returnData.CurrentPage = page
- returnData.Board.Post.Actor = actor
+ returnData.Board.Post.Actor = actor.Id
returnData.Board.Captcha = Domain + "/" + GetRandomCaptcha(db)
returnData.Board.CaptchaCode = GetCaptchaCode(returnData.Board.Captcha)
@@ -160,7 +161,7 @@ func CatalogGet(w http.ResponseWriter, r *http.Request, db *sql.DB, collection C
returnData.Board.Restricted = actor.Restricted
returnData.Key = *Key
- returnData.Board.Post.Actor = actor
+ returnData.Board.Post.Actor = actor.Id
returnData.Instance = GetActorFromDB(db, Domain)
@@ -220,12 +221,12 @@ func PostGet(w http.ResponseWriter, r *http.Request, db *sql.DB){
returnData.Posts = append(returnData.Posts, followCollection.OrderedItems[0])
var actor Actor
actor = FingerActor(returnData.Board.InReplyTo)
- returnData.Board.Post.Actor = &actor
+ returnData.Board.Post.Actor = actor.Id
}
} else {
collection := GetObjectByIDFromDB(db, inReplyTo)
- returnData.Board.Post.Actor = collection.Actor
+ returnData.Board.Post.Actor = collection.Actor.Id
returnData.Board.InReplyTo = inReplyTo
if len(collection.OrderedItems) > 0 {