diff options
author | 2024-09-10 14:34:49 +0200 | |
---|---|---|
committer | 2024-09-10 12:34:49 +0000 | |
commit | 307d98e3862b6e867eea524b81d5428b03e6607c (patch) | |
tree | b990378c5452f5779b85bd0d769db77a78f93600 /internal/federation/federatingdb/reject_test.go | |
parent | [chore] status dereferencing improvements (#3255) (diff) | |
download | gotosocial-307d98e3862b6e867eea524b81d5428b03e6607c.tar.xz |
[feature] Process `Reject` of interaction via fedi API, put rejected statuses in the "sin bin" 😈 (#3271)
* [feature] Process `Reject` of interaction via fedi API, put rejected statuses in the "sin bin"
* update test
* move nil check back to `rejectStatusIRI`
Diffstat (limited to 'internal/federation/federatingdb/reject_test.go')
-rw-r--r-- | internal/federation/federatingdb/reject_test.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/internal/federation/federatingdb/reject_test.go b/internal/federation/federatingdb/reject_test.go index f51ffaf56..8efa71ca0 100644 --- a/internal/federation/federatingdb/reject_test.go +++ b/internal/federation/federatingdb/reject_test.go @@ -23,6 +23,7 @@ import ( "github.com/stretchr/testify/suite" "github.com/superseriousbusiness/activity/streams" + "github.com/superseriousbusiness/gotosocial/internal/ap" "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" "github.com/superseriousbusiness/gotosocial/internal/uris" @@ -61,10 +62,11 @@ func (suite *RejectTestSuite) TestRejectFollowRequest() { // create a Reject reject := streams.NewActivityStreamsReject() + // set an ID on it + ap.SetJSONLDId(reject, testrig.URLMustParse("https://example.org/some/reject/id")) + // set the rejecting actor on it - acceptActorProp := streams.NewActivityStreamsActorProperty() - acceptActorProp.AppendIRI(rejectingAccountURI) - reject.SetActivityStreamsActor(acceptActorProp) + ap.AppendActorIRIs(reject, rejectingAccountURI) // Set the recreated follow as the 'object' property. acceptObject := streams.NewActivityStreamsObjectProperty() @@ -72,9 +74,7 @@ func (suite *RejectTestSuite) TestRejectFollowRequest() { reject.SetActivityStreamsObject(acceptObject) // Set the To of the reject as the originator of the follow - acceptTo := streams.NewActivityStreamsToProperty() - acceptTo.AppendIRI(requestingAccountURI) - reject.SetActivityStreamsTo(acceptTo) + ap.AppendTo(reject, requestingAccountURI) // process the reject in the federating database err = suite.federatingDB.Reject(ctx, reject) |