mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-30 03:52:26 -05:00
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
This commit is contained in:
parent
ff77bf1d11
commit
3dc7644ae6
10 changed files with 262 additions and 103 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue