diff options
author | 2024-07-23 12:51:57 -0700 | |
---|---|---|
committer | 2024-07-23 20:51:57 +0100 | |
commit | 86a59db711fa893362cfccdee3cd4a08e16ccdb5 (patch) | |
tree | edb20305ed755d70ebb0eb198057416eb18f8d78 /internal/typeutils/internal.go | |
parent | Explicitly propagate filter results from statuses to their boosts in API resp... (diff) | |
download | gotosocial-86a59db711fa893362cfccdee3cd4a08e16ccdb5.tar.xz |
Remove content and related fields from boosts (#3131)
These duplicate the content of the target and aren't necessary for anything.
- Stops copying some fields from target when boosting or processing a remote boost
- Adds a migration to null out existing duplicate data
- Updates tests
Diffstat (limited to 'internal/typeutils/internal.go')
-rw-r--r-- | internal/typeutils/internal.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/internal/typeutils/internal.go b/internal/typeutils/internal.go index 76ec6232c..75da4b27e 100644 --- a/internal/typeutils/internal.go +++ b/internal/typeutils/internal.go @@ -81,14 +81,12 @@ func (c *Converter) StatusToBoost( MentionIDs: []string{}, EmojiIDs: []string{}, + // Boosts are not considered sensitive even if their target is. + Sensitive: util.Ptr(false), + // Remaining fields all // taken from boosted status. - Content: target.Content, - ContentWarning: target.ContentWarning, ActivityStreamsType: target.ActivityStreamsType, - Sensitive: util.Ptr(*target.Sensitive), - Language: target.Language, - Text: target.Text, BoostOfID: target.ID, BoostOf: target, BoostOfAccountID: target.AccountID, |