Skip to content

Rearrange SentMediaInfo and AccumulatedSentMediaInfo #4969

Description

@Johennes

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions