From 96f71a374a9b7f7982a1ca750a33b87034aad46c Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Sun, 6 Jun 2021 14:28:27 -0700 Subject: verifying outbox activity requests with signature integration --- database.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'database.go') diff --git a/database.go b/database.go index 0898876..948bb38 100644 --- a/database.go +++ b/database.go @@ -105,21 +105,22 @@ func CreateNewBoardDB(db *sql.DB, actor Actor) Actor{ nverify.Board = actor.Id nverify.Identifier = "post" nverify.Type = "post" - CreateBoardMod(db, nverify) + CreateBoardMod(db, nverify) + CreatePem(db, actor) + if actor.Name != "main" { - var nActor Actor var nObject ObjectBase var nActivity Activity + nActor := GetActorFromDB(db, Domain) nActivity.AtContext.Context = "https://www.w3.org/ns/activitystreams" nActivity.Type = "Follow" nActivity.Actor = &nActor nActivity.Object = &nObject - nActivity.Actor.Id = Domain - var mActor Actor + + mActor := GetActorFromDB(db, actor.Id) nActivity.Object.Actor = &mActor - nActivity.Object.Actor.Id = actor.Id nActivity.To = append(nActivity.To, actor.Id) response := AcceptFollow(nActivity) @@ -127,7 +128,6 @@ func CreateNewBoardDB(db *sql.DB, actor Actor) Actor{ MakeActivityRequest(db, nActivity) } - CreatePem(db, actor) } return actor -- cgit v1.2.3