mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-06 06:53:32 -04:00
doc(timeline): Document media caching of send_attachment
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
committed by
Benjamin Bouvier
parent
7295f29055
commit
a562f73b1e
@@ -532,6 +532,12 @@ impl Timeline {
|
||||
/// If the encryption feature is enabled, this method will transparently
|
||||
/// encrypt the room message if the room is encrypted.
|
||||
///
|
||||
/// The attachment and its optional thumbnail are stored in the media cache
|
||||
/// and can be retrieved at any time, by calling
|
||||
/// [`Media::get_media_content()`] with the `MediaSource` that can be found
|
||||
/// in the corresponding `TimelineEventItem`, and using a
|
||||
/// `MediaFormat::File`.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `path` - The path of the file to be sent.
|
||||
@@ -540,6 +546,8 @@ impl Timeline {
|
||||
///
|
||||
/// * `config` - An attachment configuration object containing details about
|
||||
/// the attachment like a thumbnail, its size, duration etc.
|
||||
///
|
||||
/// [`Media::get_media_content()`]: matrix_sdk::Media::get_media_content
|
||||
#[instrument(skip_all)]
|
||||
pub fn send_attachment(
|
||||
&self,
|
||||
|
||||
Reference in New Issue
Block a user