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
This commit is contained in:
Vyr Cossont
2024-07-23 12:51:57 -07:00
committed by GitHub
parent 2d921d9d7c
commit 86a59db711
5 changed files with 68 additions and 19 deletions

View File

@ -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,