Skip to content

Conversation

Lugrim
Copy link
Contributor

@Lugrim Lugrim commented Apr 30, 2024

Hi, first PR to take a look at the code base of this project (and a bit more at matrix internals).

It displays the attachment file size by appending it in the displayed messages.
For example, it would show [Attached Image: Alt Text (12.34 kB)] or [Attached Image: Alt Text] if the size field is not present in the message information.

Adds the humansize crate to Cargo.toml.

Intends to fix #97

Lugrim added 3 commits April 30, 2024 15:11
Untested for now.

May not work if `size` is not present in message content info.

Signed-off-by: Oror <[email protected]>
Now using a `macro_rule!` to avoid code repetition.

Signed-off-by: Oror <[email protected]>
@ulyssa
Copy link
Owner

ulyssa commented May 25, 2024

This looks great! Thank you for adding more tests, too! 🙏

@ulyssa ulyssa changed the title Added attachment file size display Display file sizes for attachments May 25, 2024
@ulyssa ulyssa merged commit 497be7f into ulyssa:main May 25, 2024
@ulyssa ulyssa mentioned this pull request Aug 21, 2024
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.

Show attachment file size

2 participants