diff options
author | FChannel <> | 2021-06-06 14:28:27 -0700 |
---|---|---|
committer | FChannel <> | 2021-06-06 14:28:27 -0700 |
commit | 96f71a374a9b7f7982a1ca750a33b87034aad46c (patch) | |
tree | a1b08b317443a3335caadc7c170a3f2219e5c43d /database.go | |
parent | 42cf749f7923ac33194ab87b8dce060f46a220bc (diff) |
verifying outbox activity requests with signature integration
Diffstat (limited to 'database.go')
-rw-r--r-- | database.go | 12 |
1 files changed, 6 insertions, 6 deletions
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 |