Skip to content

Rearrange SentMediaInfo and AccumulatedSentMediaInfo #4969

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Johennes opened this issue Apr 24, 2025 · 0 comments
Open

Rearrange SentMediaInfo and AccumulatedSentMediaInfo #4969

Johennes opened this issue Apr 24, 2025 · 0 comments
Labels
A-Send event enhancement New feature or request

Comments

@Johennes
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Send event enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants