Function fractal::utils::matrix::get_media_content

source ยท
pub async fn get_media_content(
    client: Client,
    message: MessageType
) -> Result<(String, Vec<u8>), Error>
Expand description

Fetch the content of the media message in the given message.

Compatible messages:

  • File.
  • Image.
  • Video.
  • Audio.

Returns Ok((filename, binary_content)) on success.

Returns Err if an error occurred while fetching the content. Panics on an incompatible event.