You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to add support for URL previews in the matrix-rust-sdk, specifically using the matrix_sdk::ruma::api::client::media::get_media_preview endpoint. URL previews are essential for clients like Fractal, and these previews should be handled server-side as per the Matrix specification.
The API should handle two different endpoints, depending on the Matrix version supported by the homeserver (similar to how get_media_content works). This ensures backward compatibility with older versions of the Matrix protocol.
Requirements
Implement API support for URL previews using the get_media_preview endpoint.
Handle compatibility with multiple Matrix versions by supporting both relevant endpoints (similar to how get_media_content is handled).
Ensure that URL previews are done server-side, not client-side, as specified by the Matrix protocol.
Additional Context
This feature is important for integrating URL preview functionality into Fractal, so it would be ideal to implement the API in the matrix-rust-sdk first and then use it within Fractal. This ensures a proper and standardized implementation of URL previews.
Thanks @afranke for the help with this suggestion.
The text was updated successfully, but these errors were encountered:
I am currently working on a binding for the get_media_preview functionality. I will be utilizing two endpoints: api::client::authenticated_media::get_media_preview and api::client::media::get_media_preview depending oon the matrix version.
My plan is to handle the extraction of URLs from messages using the SDK. Then, I will use the API to get previews for one or more links and send that information back in a single call.
Could you please advise whether I should use regex for URL extraction, or are there specific methods or crates available in the codebase that would be more appropriate?
Additionally, I welcome any suggestions regarding the path I intend to follow.
Description
We need to add support for URL previews in the matrix-rust-sdk, specifically using the
matrix_sdk::ruma::api::client::media::get_media_preview
endpoint. URL previews are essential for clients like Fractal, and these previews should be handled server-side as per the Matrix specification.The API should handle two different endpoints, depending on the Matrix version supported by the homeserver (similar to how
get_media_content
works). This ensures backward compatibility with older versions of the Matrix protocol.Requirements
get_media_preview
endpoint.get_media_content
is handled).Additional Context
This feature is important for integrating URL preview functionality into Fractal, so it would be ideal to implement the API in the matrix-rust-sdk first and then use it within Fractal. This ensures a proper and standardized implementation of URL previews.
Thanks @afranke for the help with this suggestion.
The text was updated successfully, but these errors were encountered: