mirror of
https://github.com/girlbossceo/ruwuma.git
synced 2025-04-29 06:49:48 -04:00
events: Expose missing url preview image types
`PreviewImage` and `PreviewImageSource` were not properly exposed, making it impossible for anyone to actually use them.
This commit is contained in:
parent
f80d04d6a8
commit
0e84b0ab99
2 changed files with 5 additions and 1 deletions
|
@ -47,7 +47,7 @@ pub use self::audio::{
|
|||
UnstableAmplitude, UnstableAudioDetailsContentBlock, UnstableVoiceContentBlock,
|
||||
};
|
||||
#[cfg(feature = "unstable-msc4095")]
|
||||
pub use self::url_preview::UrlPreview;
|
||||
pub use self::url_preview::{PreviewImage, PreviewImageSource, UrlPreview};
|
||||
pub use self::{
|
||||
audio::{AudioInfo, AudioMessageEventContent},
|
||||
emote::EmoteMessageEventContent,
|
||||
|
|
|
@ -4,9 +4,13 @@ use crate::room::{EncryptedFile, OwnedMxcUri, UInt};
|
|||
|
||||
/// The Source of the PreviewImage.
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
#[allow(clippy::exhaustive_enums)]
|
||||
pub enum PreviewImageSource {
|
||||
/// Source of the PreviewImage as encrypted file data
|
||||
#[serde(rename = "beeper:image:encryption", alias = "matrix:image:encryption")]
|
||||
EncryptedImage(EncryptedFile),
|
||||
|
||||
/// Source of the PreviewImage as a simple MxcUri
|
||||
#[serde(rename = "og:image", alias = "og:image:url")]
|
||||
Url(OwnedMxcUri),
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue