diff options
| author | 2024-07-11 16:44:29 +0200 | |
|---|---|---|
| committer | 2024-07-11 15:44:29 +0100 | |
| commit | 5bc567196bf2204272950c525e8592e56057c3bd (patch) | |
| tree | 24aec5e75d2a0208505da16ee2c55efd887d3e25 /internal/federation/dereferencing | |
| parent | [bugfix] Don't throw error when parent statuses are missing (#2011) (#3088) (diff) | |
| download | gotosocial-5bc567196bf2204272950c525e8592e56057c3bd.tar.xz | |
[chore] Add interaction policy gtsmodels (#3075)
* [chore] introduce interaction policy gts models
* update migration a smidge
* fix copy paste typo
* update migration
* use int for InteractionType
Diffstat (limited to 'internal/federation/dereferencing')
| -rw-r--r-- | internal/federation/dereferencing/announce.go | 3 | ||||
| -rw-r--r-- | internal/federation/dereferencing/status.go | 4 | ||||
| -rw-r--r-- | internal/federation/dereferencing/status_test.go | 12 | 
3 files changed, 1 insertions, 18 deletions
| diff --git a/internal/federation/dereferencing/announce.go b/internal/federation/dereferencing/announce.go index 6516bdced..51f1ffcdd 100644 --- a/internal/federation/dereferencing/announce.go +++ b/internal/federation/dereferencing/announce.go @@ -92,9 +92,6 @@ func (d *Dereferencer) EnrichAnnounce(  	boost.BoostOfAccount = target.Account  	boost.Visibility = target.Visibility  	boost.Federated = target.Federated -	boost.Boostable = target.Boostable -	boost.Replyable = target.Replyable -	boost.Likeable = target.Likeable  	// Store the boost wrapper status in database.  	switch err = d.state.DB.PutStatus(ctx, boost); { diff --git a/internal/federation/dereferencing/status.go b/internal/federation/dereferencing/status.go index 406534457..0e227a0c1 100644 --- a/internal/federation/dereferencing/status.go +++ b/internal/federation/dereferencing/status.go @@ -633,9 +633,7 @@ func (d *Dereferencer) isPermittedStatus(  		}  	} -	if permitted && -		*status.InReplyTo.Replyable { -		// Status is reply-able to. +	if permitted {  		return true, nil  	} diff --git a/internal/federation/dereferencing/status_test.go b/internal/federation/dereferencing/status_test.go index 2d0085cce..3b2c2bff2 100644 --- a/internal/federation/dereferencing/status_test.go +++ b/internal/federation/dereferencing/status_test.go @@ -56,9 +56,6 @@ func (suite *StatusTestSuite) TestDereferenceSimpleStatus() {  	suite.NoError(err)  	suite.Equal(status.ID, dbStatus.ID)  	suite.True(*dbStatus.Federated) -	suite.True(*dbStatus.Boostable) -	suite.True(*dbStatus.Replyable) -	suite.True(*dbStatus.Likeable)  	// account should be in the database now too  	account, err := suite.db.GetAccountByURI(context.Background(), status.AccountURI) @@ -96,9 +93,6 @@ func (suite *StatusTestSuite) TestDereferenceStatusWithMention() {  	suite.NoError(err)  	suite.Equal(status.ID, dbStatus.ID)  	suite.True(*dbStatus.Federated) -	suite.True(*dbStatus.Boostable) -	suite.True(*dbStatus.Replyable) -	suite.True(*dbStatus.Likeable)  	// account should be in the database now too  	account, err := suite.db.GetAccountByURI(context.Background(), status.AccountURI) @@ -151,9 +145,6 @@ func (suite *StatusTestSuite) TestDereferenceStatusWithTag() {  	suite.NoError(err)  	suite.Equal(status.ID, dbStatus.ID)  	suite.True(*dbStatus.Federated) -	suite.True(*dbStatus.Boostable) -	suite.True(*dbStatus.Replyable) -	suite.True(*dbStatus.Likeable)  	// account should be in the database now too  	account, err := suite.db.GetAccountByURI(context.Background(), status.AccountURI) @@ -197,9 +188,6 @@ func (suite *StatusTestSuite) TestDereferenceStatusWithImageAndNoContent() {  	suite.NoError(err)  	suite.Equal(status.ID, dbStatus.ID)  	suite.True(*dbStatus.Federated) -	suite.True(*dbStatus.Boostable) -	suite.True(*dbStatus.Replyable) -	suite.True(*dbStatus.Likeable)  	// account should be in the database now too  	account, err := suite.db.GetAccountByURI(context.Background(), status.AccountURI) | 
