diff options
author | 2021-10-06 18:18:02 +0200 | |
---|---|---|
committer | 2021-10-06 18:18:02 +0200 | |
commit | 3dc7644ae6bdbfbae2e126896937e322247b5b33 (patch) | |
tree | 45487a241b439ce590863f68ea479d8dfd92ba28 /internal/api | |
parent | fix logs not working properly (#264) (diff) | |
download | gotosocial-3dc7644ae6bdbfbae2e126896937e322247b5b33.tar.xz |
Derive visibility fixes (#271)
* use pub public const
* don't error on no summary
* move extract visibility to separate function
* extract visibility test
* add addressable interface
Diffstat (limited to 'internal/api')
-rw-r--r-- | internal/api/s2s/user/inboxpost_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/api/s2s/user/inboxpost_test.go b/internal/api/s2s/user/inboxpost_test.go index 7e08ff77d..94b3e6507 100644 --- a/internal/api/s2s/user/inboxpost_test.go +++ b/internal/api/s2s/user/inboxpost_test.go @@ -29,6 +29,7 @@ import ( "time" "github.com/gin-gonic/gin" + "github.com/go-fed/activity/pub" "github.com/go-fed/activity/streams" "github.com/stretchr/testify/suite" "github.com/superseriousbusiness/gotosocial/internal/api/s2s/user" @@ -247,7 +248,7 @@ func (suite *InboxPostTestSuite) TestPostUpdate() { // Set the To of the update as public updateTo := streams.NewActivityStreamsToProperty() - updateTo.AppendIRI(testrig.URLMustParse("https://www.w3.org/ns/activitystreams#Public")) + updateTo.AppendIRI(testrig.URLMustParse(pub.PublicActivityPubIRI)) update.SetActivityStreamsTo(updateTo) // set the cc of the update to the receivingAccount @@ -370,7 +371,7 @@ func (suite *InboxPostTestSuite) TestPostDelete() { // Set the To of the delete as public deleteTo := streams.NewActivityStreamsToProperty() - deleteTo.AppendIRI(testrig.URLMustParse("https://www.w3.org/ns/activitystreams#Public")) + deleteTo.AppendIRI(testrig.URLMustParse(pub.PublicActivityPubIRI)) delete.SetActivityStreamsTo(deleteTo) // set some random-ass ID for the activity |