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

@@ -1488,8 +1488,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
ID: "01G36SF3V6Y6V5BF9P4R7PQG7G",
URI: "http://localhost:8080/users/admin/statuses/01G36SF3V6Y6V5BF9P4R7PQG7G",
URL: "http://localhost:8080/@admin/statuses/01G36SF3V6Y6V5BF9P4R7PQG7G",
Content: "hello everyone!",
Text: "hello everyone!",
CreatedAt: TimeMustParse("2021-10-20T12:41:37+02:00"),
UpdatedAt: TimeMustParse("2021-10-20T12:41:37+02:00"),
Local: util.Ptr(true),
@@ -1501,10 +1499,8 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
BoostOfID: "01F8MHAMCHF6Y650WCRSCP4WMY",
BoostOfAccountID: "01F8MH1H7YV1Z7D2C8K2730QBF",
ThreadID: "",
ContentWarning: "introduction post",
Visibility: gtsmodel.VisibilityPublic,
Sensitive: util.Ptr(true),
Language: "en",
Sensitive: util.Ptr(false),
CreatedWithApplicationID: "01F8MGXQRHYF5QPMTMXP78QC2F",
Federated: util.Ptr(true),
ActivityStreamsType: ap.ObjectNote,