diff options
| author | 2024-01-18 16:11:13 +0000 | |
|---|---|---|
| committer | 2024-02-14 14:03:20 +0100 | |
| commit | 5d44ad75990cb66db4c1bd9bfe0e499ba2b52aa1 (patch) | |
| tree | 2e2981d7632151d1dd9fe488b0d33d8a6c649d92 /internal/api | |
| parent | [bugfix] Ensure activities sender always = activities actor (#2608) (diff) | |
| download | gotosocial-5d44ad75990cb66db4c1bd9bfe0e499ba2b52aa1.tar.xz | |
[chore] chore rationalise http return codes for activitypub handlers (#2540)
* some small code fixups and changes
* add check in ResolveIncomingActivity for transient activity types (i.e. activity ID is nil)
* update test to handle new transient behaviour
Diffstat (limited to 'internal/api')
| -rw-r--r-- | internal/api/activitypub/users/inboxpost_test.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/internal/api/activitypub/users/inboxpost_test.go b/internal/api/activitypub/users/inboxpost_test.go index cde807d8d..6e37b8a48 100644 --- a/internal/api/activitypub/users/inboxpost_test.go +++ b/internal/api/activitypub/users/inboxpost_test.go @@ -478,15 +478,17 @@ func (suite *InboxPostTestSuite) TestPostEmptyCreate() { targetAccount = suite.testAccounts["local_account_1"] ) - // Post a create with no object. + // Post a create with no object, this + // should get accepted and silently dropped + // as the lack of ID marks it as transient. create := streams.NewActivityStreamsCreate() suite.inboxPost( create, requestingAccount, targetAccount, - http.StatusBadRequest, - `{"error":"Bad Request: missing ActivityStreams id property"}`, + http.StatusAccepted, + `{"status":"Accepted"}`, suite.signatureCheck, ) } |
