mirror of
https://gitlab.com/famedly/conduit.git
synced 2025-08-06 17:40:59 +00:00
More flexible preview config
This commit is contained in:
parent
6789ed336e
commit
b76357c80e
5 changed files with 125 additions and 75 deletions
|
@ -7,6 +7,7 @@ use ruma::{
|
|||
|
||||
use crate::api::server_server::DestinationResponse;
|
||||
|
||||
use crate::config::UrlPreviewConfig;
|
||||
use crate::{services, Config, Error, Result};
|
||||
use futures_util::FutureExt;
|
||||
use hickory_resolver::TokioAsyncResolver;
|
||||
|
@ -324,8 +325,8 @@ impl Service {
|
|||
self.config.allow_federation
|
||||
}
|
||||
|
||||
pub fn url_preview_allowlist(&self) -> impl Iterator<Item=&str> {
|
||||
self.config.url_preview_allowlist.iter().map(|x| x.as_str())
|
||||
pub fn url_previews(&self) -> &UrlPreviewConfig {
|
||||
&self.config.url_previews
|
||||
}
|
||||
|
||||
pub fn allow_room_creation(&self) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue