In #4897, a new field accumulated: Vec<AccumulatedSentMediaInfo> was introduced into SentMediaInfo. This was convenient because it didn't require a data migration but lead to an odd duplication where SentMediaInfo contains the fields for an item that will later move into accumulated. Instead, we should rearrange the structs so that:
SentMediaInfo contains only the vec of AccumulatedSentMediaInfo (since a vec can hold the pair for the media, when there's only a single one and no gallery)
AccumulatedSentMediaInfo (maybe rename SingleSentMediaInfo?) can keep on holding its current fields
This will then require a data migration which is why it was broken out from #4897.
See also https://github.com/matrix-org/matrix-rust-sdk/pull/4897/files#r2048581359.
In #4897, a new field
accumulated: Vec<AccumulatedSentMediaInfo>was introduced intoSentMediaInfo. This was convenient because it didn't require a data migration but lead to an odd duplication whereSentMediaInfocontains the fields for an item that will later move intoaccumulated. Instead, we should rearrange the structs so that:SentMediaInfocontains only the vec ofAccumulatedSentMediaInfo(since a vec can hold the pair for the media, when there's only a single one and no gallery)AccumulatedSentMediaInfo(maybe renameSingleSentMediaInfo?) can keep on holding its current fieldsThis will then require a data migration which is why it was broken out from #4897.
See also https://github.com/matrix-org/matrix-rust-sdk/pull/4897/files#r2048581359.