mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-06 23:58:12 -06:00
[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
This commit is contained in:
parent
8f8093aea4
commit
5bc567196b
46 changed files with 1318 additions and 531 deletions
|
|
@ -399,9 +399,6 @@ func (c *Converter) ASStatusToStatus(ctx context.Context, statusable ap.Statusab
|
|||
// needs to be created for this in go-fed/activity.
|
||||
// Until this is implemented, assume all true.
|
||||
status.Federated = util.Ptr(true)
|
||||
status.Boostable = util.Ptr(true)
|
||||
status.Replyable = util.Ptr(true)
|
||||
status.Likeable = util.Ptr(true)
|
||||
|
||||
// status.Sensitive
|
||||
sensitive := ap.ExtractSensitive(statusable)
|
||||
|
|
|
|||
|
|
@ -181,9 +181,6 @@ func (suite *ASToInternalTestSuite) TestParseReplyWithMention() {
|
|||
suite.Equal(inReplyToStatus.ID, status.InReplyToID)
|
||||
suite.Equal(inReplyToStatus.URI, status.InReplyToURI)
|
||||
suite.True(*status.Federated)
|
||||
suite.True(*status.Boostable)
|
||||
suite.True(*status.Replyable)
|
||||
suite.True(*status.Likeable)
|
||||
suite.Equal(`<p><span class="h-card"><a href="http://localhost:8080/@the_mighty_zork" class="u-url mention">@<span>the_mighty_zork</span></a></span> nice there it is:</p><p><a href="http://localhost:8080/users/the_mighty_zork/statuses/01F8MHAMCHF6Y650WCRSCP4WMY/activity" rel="nofollow noopener noreferrer" target="_blank"><span class="invisible">https://</span><span class="ellipsis">social.pixie.town/users/f0x/st</span><span class="invisible">atuses/106221628567855262/activity</span></a></p>`, status.Content)
|
||||
suite.Len(status.Mentions, 1)
|
||||
m1 := status.Mentions[0]
|
||||
|
|
|
|||
|
|
@ -95,9 +95,6 @@ func (c *Converter) StatusToBoost(
|
|||
BoostOfAccount: target.Account,
|
||||
Visibility: target.Visibility,
|
||||
Federated: util.Ptr(*target.Federated),
|
||||
Boostable: util.Ptr(*target.Boostable),
|
||||
Replyable: util.Ptr(*target.Replyable),
|
||||
Likeable: util.Ptr(*target.Likeable),
|
||||
}
|
||||
|
||||
return boost, nil
|
||||
|
|
|
|||
|
|
@ -98,9 +98,6 @@ func (suite *InternalToRSSTestSuite) TestStatusToRSSItem3() {
|
|||
Visibility: gtsmodel.VisibilityDefault,
|
||||
ActivityStreamsType: ap.ObjectNote,
|
||||
Federated: util.Ptr(true),
|
||||
Boostable: util.Ptr(true),
|
||||
Replyable: util.Ptr(true),
|
||||
Likeable: util.Ptr(true),
|
||||
}
|
||||
item, err := suite.typeconverter.StatusToRSSItem(context.Background(), s)
|
||||
suite.NoError(err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue