Skip to content
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

feat(sdk): Allow to set and check whether an image is animated #4503

Merged
merged 2 commits into from
Jan 10, 2025

Conversation

zecakeh
Copy link
Collaborator

@zecakeh zecakeh commented Jan 10, 2025

Using MSC4230.

While I was in the area I added a second commit to implement Default for the Base*Info types since they only have optional fields and it is easier to construct them that way when we don't want to set all fields.

This can be reviewed commit by commit.

  • Public API changes documented in changelogs (optional)

@zecakeh zecakeh requested a review from a team as a code owner January 10, 2025 11:24
@zecakeh zecakeh requested review from bnjbvr and removed request for a team January 10, 2025 11:24
Copy link

codecov bot commented Jan 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.36%. Comparing base (cb72d43) to head (ece3614).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4503      +/-   ##
==========================================
- Coverage   85.37%   85.36%   -0.01%     
==========================================
  Files         284      284              
  Lines       31885    31886       +1     
==========================================
- Hits        27222    27221       -1     
- Misses       4663     4665       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@poljar poljar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.


- Allow to set and check whether an image is animated via its `ImageInfo`.
- Implement `Default` for `BaseImageInfo`, `BaseVideoIndo`, `BaseAudioInfo` and
`BaseFileInfo`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I spoke too soon. Could you please link to the PR here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Since all of their fields are optional, it simplifies their
construction.

Signed-off-by: Kévin Commaille <[email protected]>
@zecakeh
Copy link
Collaborator Author

zecakeh commented Jan 10, 2025

Fixed a typo too.

Copy link
Contributor

@poljar poljar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

@poljar poljar enabled auto-merge (rebase) January 10, 2025 13:26
@poljar poljar merged commit 5941495 into matrix-org:main Jan 10, 2025
41 checks passed
@zecakeh zecakeh deleted the image-is-animated branch January 10, 2025 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants