diff --git a/deltachat-jsonrpc/src/api/types/webxdc.rs b/deltachat-jsonrpc/src/api/types/webxdc.rs index 71db9ed93..e43b83579 100644 --- a/deltachat-jsonrpc/src/api/types/webxdc.rs +++ b/deltachat-jsonrpc/src/api/types/webxdc.rs @@ -35,6 +35,9 @@ pub struct WebxdcMessageInfo { source_code_url: Option, /// True if full internet access should be granted to the app. internet_access: bool, + + /// prefered screen orientation (landscape or portrait). + orientation: Option, } impl WebxdcMessageInfo { @@ -50,6 +53,7 @@ impl WebxdcMessageInfo { summary, source_code_url, internet_access, + orientation, } = message.get_webxdc_info(context).await?; Ok(Self { @@ -59,6 +63,7 @@ impl WebxdcMessageInfo { summary: maybe_empty_string_to_option(summary), source_code_url: maybe_empty_string_to_option(source_code_url), internet_access, + orientation: maybe_empty_string_to_option(orientation), }) } } diff --git a/src/webxdc.rs b/src/webxdc.rs index 3b00028fd..9a042cca1 100644 --- a/src/webxdc.rs +++ b/src/webxdc.rs @@ -83,6 +83,9 @@ pub struct WebxdcManifest { /// If the webxdc requests network access. pub request_internet_access: Option, + + /// prefered screen orientation (landscape or portrait). + pub orientation: Option, } /// Parsed information from WebxdcManifest and fallbacks. @@ -111,6 +114,9 @@ pub struct WebxdcInfo { /// It should request access, be encrypted /// and sent to self for this. pub internet_access: bool, + + /// prefered screen orientation (landscape or portrait). + pub orientation: String, } /// Status Update ID. @@ -841,6 +847,11 @@ impl Message { "".to_string() }, internet_access, + orientation: if let Some(orientation) = manifest.orientation { + orientation + } else { + "".to_string() + }, }) } }