mirror of
https://github.com/chatmail/core.git
synced 2026-04-21 07:26:29 +03:00
restricted webxdc internet access (#3516)
* add request_internet_access manifest option * test request_internet_access * update CHANGELOG * force warning when internet access is enabled if internet access is enabled, show a warning instead of the normal summary (the internet access is currently mainly to test out integrations as maps for video chat; the summary is dispensable in the cases currently) * adapt json-rpc's WebxdcMessageInfo
This commit is contained in:
@@ -33,6 +33,8 @@ pub struct WebxdcMessageInfo {
|
||||
/// defaults to an empty string.
|
||||
/// Implementations may offer an menu or a button to open this URL.
|
||||
source_code_url: Option<String>,
|
||||
/// True if full internet access should be granted to the app.
|
||||
internet_access: bool,
|
||||
}
|
||||
|
||||
impl WebxdcMessageInfo {
|
||||
@@ -47,6 +49,7 @@ impl WebxdcMessageInfo {
|
||||
document,
|
||||
summary,
|
||||
source_code_url,
|
||||
internet_access,
|
||||
} = message.get_webxdc_info(context).await?;
|
||||
|
||||
Ok(Self {
|
||||
@@ -55,6 +58,7 @@ impl WebxdcMessageInfo {
|
||||
document: maybe_empty_string_to_option(document),
|
||||
summary: maybe_empty_string_to_option(summary),
|
||||
source_code_url: maybe_empty_string_to_option(source_code_url),
|
||||
internet_access,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user