lemmy/crates/db_schema/src/source/mod.rs

50 lines
1.3 KiB
Rust
Raw Normal View History

use crate::newtypes::DbUrl;
use url::Url;
#[cfg(feature = "full")]
pub mod activity;
pub mod actor_language;
2023-06-27 10:38:53 +00:00
pub mod captcha_answer;
pub mod comment;
pub mod comment_reply;
2020-12-17 03:03:03 +00:00
pub mod comment_report;
pub mod community;
pub mod community_block;
pub mod custom_emoji;
pub mod custom_emoji_keyword;
pub mod email_verification;
pub mod federation_allowlist;
pub mod federation_blocklist;
pub mod federation_queue_state;
Rewrite images to use local proxy (#4035) * Add markdown rule to add rel=nofollow for all links * Add markdown image rule to add local image proxy (fixes #1036) * comments * rewrite markdown image links working * add comment * perform markdown image processing in api/apub receivers * clippy * add db table to validate proxied links * rewrite link fields for avatar, banner etc * sql fmt * proxy links received over federation * add config option * undo post.url rewriting, move http route definition * add tests * proxy images through pictrs * testing * cleanup request.rs file * more cleanup (fixes #2611) * include url content type when sending post over apub (fixes #2611) * store post url content type in db * should be media_type * get rid of cache_remote_thumbnails setting, instead automatically take thumbnail from federation data if available. * fix tests * add setting disable_external_link_previews * federate post url as image depending on mime type * change setting again * machete * invert * support custom emoji * clippy * update defaults * add image proxy test, fix test * fix test * clippy * revert accidental changes * address review * clippy * Markdown link rule-dess (#4356) * Extracting opengraph_data to its own type. * A few additions for markdown-link-rule. --------- Co-authored-by: Nutomic <me@nutomic.com> * fix setting * use enum for image proxy setting * fix test configs * add config backwards compat * clippy * machete --------- Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2024-01-25 14:22:11 +00:00
pub mod images;
pub mod instance;
pub mod instance_block;
pub mod language;
pub mod local_site;
pub mod local_site_rate_limit;
2021-03-11 04:43:11 +00:00
pub mod local_user;
pub mod login_token;
pub mod moderator;
pub mod password_reset_request;
2021-03-11 04:43:11 +00:00
pub mod person;
pub mod person_block;
2021-03-11 04:43:11 +00:00
pub mod person_mention;
pub mod post;
2020-12-17 03:03:03 +00:00
pub mod post_report;
pub mod private_message;
pub mod private_message_report;
pub mod registration_application;
pub mod secret;
pub mod site;
pub mod tagline;
/// Default value for columns like [community::Community.inbox_url] which are marked as serde(skip).
///
/// This is necessary so they can be successfully deserialized from API responses, even though the
/// value is not sent by Lemmy. Necessary for crates which rely on Rust API such as lemmy-stats-crawler.
fn placeholder_apub_url() -> DbUrl {
DbUrl(Box::new(
Url::parse("http://example.com").expect("parse placeholer url"),
))
}