diff --git a/RELEASES.md b/RELEASES.md index 98a9f841c..7220f82c9 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,3 +1,15 @@ +# Lemmy v0.16.6 Release : bug fixes (2022-07-19) + +A few bug fixes: + +- Fix problem where actors can have empty public key (fixes [#2347](https://github.com/LemmyNet/lemmy/issues/2347)) ([#2348](https://github.com/LemmyNet/lemmy/issues/2348)) +- Be more explicit about returning deleted actors or not ([#2335](https://github.com/LemmyNet/lemmy/issues/2335)) +- Dont allow blocking admin ([#2340](https://github.com/LemmyNet/lemmy/issues/2340)) +- Increase RSS fetch limit to 20. Fixes [#2319](https://github.com/LemmyNet/lemmy/issues/2319) ([#2327](https://github.com/LemmyNet/lemmy/issues/2327)) +- Fix length of post_report.original_post_name db field (fixes [#2311](https://github.com/LemmyNet/lemmy/issues/2311)) ([#2315](https://github.com/LemmyNet/lemmy/issues/2315)) +- Add pub use for db crates in api_common ([#2305](https://github.com/LemmyNet/lemmy/issues/2305)) +- Accept private like ([#1968](https://github.com/LemmyNet/lemmy/issues/1968)) ([#2301](https://github.com/LemmyNet/lemmy/issues/2301)) + # Lemmy v0.16.4 Release : Peertube federation, Rust API and other improvements (2022-05-27) ## What is Lemmy? diff --git a/api_tests/src/follow.spec.ts b/api_tests/src/follow.spec.ts index b5588572f..65b750122 100644 --- a/api_tests/src/follow.spec.ts +++ b/api_tests/src/follow.spec.ts @@ -26,13 +26,10 @@ test('Follow federated community', async () => { betaCommunity.community.id ); - // Wait for it to accept on the alpha side ( follows are async ) - await delay(); - // Make sure the follow response went through expect(follow.community_view.community.local).toBe(false); expect(follow.community_view.community.name).toBe('main'); - expect(follow.community_view.subscribed).toBe(SubscribedType.Pending); + expect(follow.community_view.subscribed).toBe(SubscribedType.Subscribed); // Check it from local let site = await getSite(alpha); diff --git a/config/defaults.hjson b/config/defaults.hjson index c85658567..9e405407a 100644 --- a/config/defaults.hjson +++ b/config/defaults.hjson @@ -73,7 +73,7 @@ debug: false } # Pictrs image server configuration. - pictrs_config: { + pictrs: { # Address where pictrs is available (for image hosting) url: "http://pictrs:8080/" # Set a custom pictrs API key. ( Required for deleting images ) diff --git a/crates/apub/src/fetcher/search.rs b/crates/apub/src/fetcher/search.rs index 1622e451d..00fbf67fe 100644 --- a/crates/apub/src/fetcher/search.rs +++ b/crates/apub/src/fetcher/search.rs @@ -32,9 +32,11 @@ pub async fn search_by_apub_id( .await } Err(_) => { - let (kind, identifier) = query.split_at(1); + let mut chars = query.chars(); + let kind = chars.next(); + let identifier = chars.as_str(); match kind { - "@" => { + Some('@') => { let id = webfinger_resolve_actor::(identifier, context, request_counter).await?; Ok(SearchableObjects::Person( @@ -43,7 +45,7 @@ pub async fn search_by_apub_id( .await?, )) } - "!" => { + Some('!') => { let id = webfinger_resolve_actor::(identifier, context, request_counter).await?; Ok(SearchableObjects::Community( diff --git a/crates/apub/src/fetcher/webfinger.rs b/crates/apub/src/fetcher/webfinger.rs index 8dda8ae1b..80dd3bc6e 100644 --- a/crates/apub/src/fetcher/webfinger.rs +++ b/crates/apub/src/fetcher/webfinger.rs @@ -39,7 +39,7 @@ where let (_, domain) = identifier .splitn(2, '@') .collect_tuple() - .expect("invalid query"); + .ok_or_else(|| LemmyError::from_message("Invalid webfinger query, missing domain"))?; let fetch_url = format!( "{}://{}/.well-known/webfinger?resource=acct:{}", protocol, domain, identifier diff --git a/crates/db_schema/src/impls/community.rs b/crates/db_schema/src/impls/community.rs index 45675aa36..eb92d7a0b 100644 --- a/crates/db_schema/src/impls/community.rs +++ b/crates/db_schema/src/impls/community.rs @@ -294,7 +294,7 @@ impl Followable for CommunityFollower { .filter(community_id.eq(community_id_)) .filter(person_id.eq(person_id_)), ) - .set(pending.eq(true)) + .set(pending.eq(false)) .get_result::(conn) } fn unfollow( diff --git a/crates/utils/src/settings/mod.rs b/crates/utils/src/settings/mod.rs index f095baf12..50d3fc583 100644 --- a/crates/utils/src/settings/mod.rs +++ b/crates/utils/src/settings/mod.rs @@ -101,7 +101,7 @@ impl Settings { pub fn pictrs_config(&self) -> Result { self - .pictrs_config + .pictrs .to_owned() .ok_or_else(|| anyhow!("images_disabled").into()) } diff --git a/crates/utils/src/settings/structs.rs b/crates/utils/src/settings/structs.rs index 7ee8cf18b..ecf19aaff 100644 --- a/crates/utils/src/settings/structs.rs +++ b/crates/utils/src/settings/structs.rs @@ -17,7 +17,7 @@ pub struct Settings { pub federation: FederationConfig, /// Pictrs image server configuration. #[default(Some(Default::default()))] - pub(crate) pictrs_config: Option, + pub(crate) pictrs: Option, #[default(Default::default())] pub captcha: CaptchaConfig, /// Email sending configuration. All options except login/password are mandatory @@ -61,7 +61,7 @@ pub struct Settings { pub struct PictrsConfig { /// Address where pictrs is available (for image hosting) #[default(Url::parse("http://pictrs:8080").expect("parse pictrs url"))] - #[doku(example = "Url::parse(\"http://pictrs:8080\").unwrap()")] + #[doku(example = "http://pictrs:8080")] pub url: Url, /// Set a custom pictrs API key. ( Required for deleting images )