use lemmy_db_schema::{
newtypes::{CommentId, CommunityId, LanguageId, PersonId, PostId},
source::{instance::Instance, language::Language, tagline::Tagline},
- ListingType,
- ModlogActionType,
- RegistrationMode,
- SearchType,
- SortType,
+ ListingType, ModlogActionType, RegistrationMode, SearchType, SortType,
};
use lemmy_db_views::structs::{
- CommentView,
- CustomEmojiView,
- LocalUserView,
- PostView,
- RegistrationApplicationView,
- SiteView,
+ CommentView, CustomEmojiView, LocalUserView, PostView, RegistrationApplicationView, SiteView,
};
use lemmy_db_views_actor::structs::{
- CommunityBlockView,
- CommunityFollowerView,
- CommunityModeratorView,
- CommunityView,
- PersonBlockView,
- PersonView,
+ CommunityBlockView, CommunityFollowerView, CommunityModeratorView, CommunityView,
+ PersonBlockView, PersonView,
};
use lemmy_db_views_moderator::structs::{
- AdminPurgeCommentView,
- AdminPurgeCommunityView,
- AdminPurgePersonView,
- AdminPurgePostView,
- ModAddCommunityView,
- ModAddView,
- ModBanFromCommunityView,
- ModBanView,
- ModFeaturePostView,
- ModHideCommunityView,
- ModLockPostView,
- ModRemoveCommentView,
- ModRemoveCommunityView,
- ModRemovePostView,
- ModTransferCommunityView,
+ AdminPurgeCommentView, AdminPurgeCommunityView, AdminPurgePersonView, AdminPurgePostView,
+ ModAddCommunityView, ModAddView, ModBanFromCommunityView, ModBanView, ModFeaturePostView,
+ ModHideCommunityView, ModLockPostView, ModRemoveCommentView, ModRemoveCommunityView,
+ ModRemovePostView, ModTransferCommunityView,
};
use serde::{Deserialize, Serialize};
use serde_with::skip_serializing_none;
pub struct ResolveObject {
/// Can be the full url, or a shortened version like: !fediverse@lemmy.ml
pub q: String,
- pub auth: Sensitive<String>,
+ pub auth: Option<Sensitive<String>>,
}
#[skip_serializing_none]
pub icon: Option<String>,
pub banner: Option<String>,
pub enable_downvotes: Option<bool>,
+ pub enable_federated_downvotes: Option<bool>,
pub enable_nsfw: Option<bool>,
pub community_creation_admin_only: Option<bool>,
pub require_email_verification: Option<bool>,
pub rate_limit_search_per_second: Option<i32>,
pub federation_enabled: Option<bool>,
pub federation_debug: Option<bool>,
- pub federation_worker_count: Option<i32>,
pub captcha_enabled: Option<bool>,
pub captcha_difficulty: Option<String>,
pub allowed_instances: Option<Vec<String>>,
pub banner: Option<String>,
/// Whether to enable downvotes.
pub enable_downvotes: Option<bool>,
+ /// Whether to allow downvotes from federated sites.
+ pub enable_federated_downvotes: Option<bool>,
/// Whether to enable NSFW.
pub enable_nsfw: Option<bool>,
/// Limits community creation to admins only.
pub federation_enabled: Option<bool>,
/// Enables federation debugging.
pub federation_debug: Option<bool>,
- /// The number of federation workers.
- pub federation_worker_count: Option<i32>,
/// Whether to enable captchas for signups.
pub captcha_enabled: Option<bool>,
/// The captcha difficulty. Can be easy, medium, or hard
/// The response for a site.
pub struct SiteResponse {
pub site_view: SiteView,
+ pub taglines: Vec<Tagline>,
}
#[skip_serializing_none]
pub struct GetSiteResponse {
pub site_view: SiteView,
pub admins: Vec<PersonView>,
- pub online: usize,
pub version: String,
pub my_user: Option<MyUserInfo>,
pub all_languages: Vec<Language>,
pub auth: Sensitive<String>,
}
-#[derive(Serialize, Deserialize)]
+#[derive(Serialize, Deserialize, Clone)]
#[cfg_attr(feature = "full", derive(TS))]
#[cfg_attr(feature = "full", ts(export))]
/// The response for purged items.