From ef7eb7330018c84a44fb24711982c25f51749d2e Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Thu, 24 Jun 2021 23:45:18 -0700 Subject: changed activitystream formating for objects to better align with pleromas actor field --- outboxGet.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'outboxGet.go') diff --git a/outboxGet.go b/outboxGet.go index 49b7bd5..acc1eee 100644 --- a/outboxGet.go +++ b/outboxGet.go @@ -45,7 +45,7 @@ func GetCollectionFromPath(db *sql.DB, path string) Collection { CheckError(err, "error scan object into post struct from path") - post.Actor = &actor + post.Actor = actor.Id post.InReplyTo = GetInReplyToDB(db, post) @@ -88,9 +88,9 @@ func GetObjectFromPath(db *sql.DB, path string) ObjectBase{ var previewID string var nActor Actor - nObj.Actor = &nActor + nObj.Actor = nActor.Id - err = rows.Scan(&nObj.Id, &nObj.Name, &nObj.Content, &nObj.Type, &nObj.Published, &nObj.AttributedTo, &attachID, &previewID, &nObj.Actor.Id) + err = rows.Scan(&nObj.Id, &nObj.Name, &nObj.Content, &nObj.Type, &nObj.Published, &nObj.AttributedTo, &attachID, &previewID, &nObj.Actor) CheckError(err, "error scan object into post struct from path") -- cgit v1.2.3 From 80bcce22a2368c3911137dec97d6744dee328809 Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Fri, 25 Jun 2021 14:55:18 -0700 Subject: more cleaning up to better intergrate with plemroma standards. can verify signatures better --- outboxGet.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'outboxGet.go') diff --git a/outboxGet.go b/outboxGet.go index acc1eee..4064f0b 100644 --- a/outboxGet.go +++ b/outboxGet.go @@ -16,7 +16,7 @@ func GetActorOutbox(w http.ResponseWriter, r *http.Request, db *sql.DB) { collection.TotalItems = GetObjectPostsTotalDB(db, actor) collection.TotalImgs = GetObjectImgsTotalDB(db, actor) - enc, _ := json.MarshalIndent(collection, "", "\t") + enc, _ := json.Marshal(collection) w.Header().Set("Content-Type", activitystreams) w.Write(enc) -- cgit v1.2.3