mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-10-01 01:36:12 -04:00
Merge remote-tracking branch 'upstream/main' into db-traits-refactor
This commit is contained in:
commit
29b00d7ae8
22
Cargo.lock
generated
22
Cargo.lock
generated
@ -2573,7 +2573,7 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||
|
||||
[[package]]
|
||||
name = "lemmy_api"
|
||||
version = "0.18.1-rc.4"
|
||||
version = "0.18.1-rc.9"
|
||||
dependencies = [
|
||||
"actix-web",
|
||||
"anyhow",
|
||||
@ -2598,7 +2598,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lemmy_api_common"
|
||||
version = "0.18.1-rc.4"
|
||||
version = "0.18.1-rc.9"
|
||||
dependencies = [
|
||||
"actix-web",
|
||||
"anyhow",
|
||||
@ -2627,7 +2627,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lemmy_api_crud"
|
||||
version = "0.18.1-rc.4"
|
||||
version = "0.18.1-rc.9"
|
||||
dependencies = [
|
||||
"activitypub_federation",
|
||||
"actix-web",
|
||||
@ -2648,7 +2648,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lemmy_apub"
|
||||
version = "0.18.1-rc.4"
|
||||
version = "0.18.1-rc.9"
|
||||
dependencies = [
|
||||
"activitypub_federation",
|
||||
"actix-web",
|
||||
@ -2686,7 +2686,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lemmy_db_schema"
|
||||
version = "0.18.1-rc.4"
|
||||
version = "0.18.1-rc.9"
|
||||
dependencies = [
|
||||
"activitypub_federation",
|
||||
"async-trait",
|
||||
@ -2723,7 +2723,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lemmy_db_views"
|
||||
version = "0.18.1-rc.4"
|
||||
version = "0.18.1-rc.9"
|
||||
dependencies = [
|
||||
"diesel",
|
||||
"diesel-async",
|
||||
@ -2740,7 +2740,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lemmy_db_views_actor"
|
||||
version = "0.18.1-rc.4"
|
||||
version = "0.18.1-rc.9"
|
||||
dependencies = [
|
||||
"diesel",
|
||||
"diesel-async",
|
||||
@ -2753,7 +2753,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lemmy_db_views_moderator"
|
||||
version = "0.18.1-rc.4"
|
||||
version = "0.18.1-rc.9"
|
||||
dependencies = [
|
||||
"diesel",
|
||||
"diesel-async",
|
||||
@ -2765,7 +2765,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lemmy_routes"
|
||||
version = "0.18.1-rc.4"
|
||||
version = "0.18.1-rc.9"
|
||||
dependencies = [
|
||||
"activitypub_federation",
|
||||
"actix-web",
|
||||
@ -2790,7 +2790,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lemmy_server"
|
||||
version = "0.18.1-rc.4"
|
||||
version = "0.18.1-rc.9"
|
||||
dependencies = [
|
||||
"activitypub_federation",
|
||||
"actix-cors",
|
||||
@ -2832,7 +2832,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lemmy_utils"
|
||||
version = "0.18.1-rc.4"
|
||||
version = "0.18.1-rc.9"
|
||||
dependencies = [
|
||||
"actix-web",
|
||||
"anyhow",
|
||||
|
22
Cargo.toml
22
Cargo.toml
@ -1,5 +1,5 @@
|
||||
[workspace.package]
|
||||
version = "0.18.1-rc.4"
|
||||
version = "0.18.1-rc.9"
|
||||
edition = "2021"
|
||||
description = "A link aggregator for the fediverse"
|
||||
license = "AGPL-3.0"
|
||||
@ -44,16 +44,16 @@ members = [
|
||||
]
|
||||
|
||||
[workspace.dependencies]
|
||||
lemmy_api = { version = "=0.18.1-rc.4", path = "./crates/api" }
|
||||
lemmy_api_crud = { version = "=0.18.1-rc.4", path = "./crates/api_crud" }
|
||||
lemmy_apub = { version = "=0.18.1-rc.4", path = "./crates/apub" }
|
||||
lemmy_utils = { version = "=0.18.1-rc.4", path = "./crates/utils" }
|
||||
lemmy_db_schema = { version = "=0.18.1-rc.4", path = "./crates/db_schema" }
|
||||
lemmy_api_common = { version = "=0.18.1-rc.4", path = "./crates/api_common" }
|
||||
lemmy_routes = { version = "=0.18.1-rc.4", path = "./crates/routes" }
|
||||
lemmy_db_views = { version = "=0.18.1-rc.4", path = "./crates/db_views" }
|
||||
lemmy_db_views_actor = { version = "=0.18.1-rc.4", path = "./crates/db_views_actor" }
|
||||
lemmy_db_views_moderator = { version = "=0.18.1-rc.4", path = "./crates/db_views_moderator" }
|
||||
lemmy_api = { version = "=0.18.1-rc.9", path = "./crates/api" }
|
||||
lemmy_api_crud = { version = "=0.18.1-rc.9", path = "./crates/api_crud" }
|
||||
lemmy_apub = { version = "=0.18.1-rc.9", path = "./crates/apub" }
|
||||
lemmy_utils = { version = "=0.18.1-rc.9", path = "./crates/utils" }
|
||||
lemmy_db_schema = { version = "=0.18.1-rc.9", path = "./crates/db_schema" }
|
||||
lemmy_api_common = { version = "=0.18.1-rc.9", path = "./crates/api_common" }
|
||||
lemmy_routes = { version = "=0.18.1-rc.9", path = "./crates/routes" }
|
||||
lemmy_db_views = { version = "=0.18.1-rc.9", path = "./crates/db_views" }
|
||||
lemmy_db_views_actor = { version = "=0.18.1-rc.9", path = "./crates/db_views_actor" }
|
||||
lemmy_db_views_moderator = { version = "=0.18.1-rc.9", path = "./crates/db_views_moderator" }
|
||||
activitypub_federation = { version = "0.4.4", default-features = false, features = ["actix-web"] }
|
||||
diesel = "2.1.0"
|
||||
diesel_migrations = "2.1.0"
|
||||
|
@ -676,7 +676,6 @@ pub async fn remove_user_data_in_community(
|
||||
.conn(&mut *conn)
|
||||
.creator_id(Some(banned_person_id))
|
||||
.community_id(Some(community_id))
|
||||
.limit(Some(i64::MAX))
|
||||
.build()
|
||||
.list()
|
||||
.await?;
|
||||
|
@ -36,7 +36,7 @@ use lemmy_db_schema::{
|
||||
post::Post,
|
||||
},
|
||||
traits::JoinView,
|
||||
utils::{fuzzy_search, limit_and_offset_unlimited, DbConn},
|
||||
utils::{fuzzy_search, limit_and_offset, DbConn},
|
||||
CommentSortType,
|
||||
ListingType,
|
||||
};
|
||||
@ -338,9 +338,12 @@ impl<'a, Conn: DbConn> CommentQuery<'a, Conn> {
|
||||
// This does not work for comment trees, and the limit should be manually set to a high number
|
||||
//
|
||||
// If a max depth is given, then you know its a tree fetch, and limits should be ignored
|
||||
(i64::MAX, 0)
|
||||
// TODO a kludge to prevent attacks. Limit comments to 300 for now.
|
||||
// (i64::MAX, 0)
|
||||
(300, 0)
|
||||
} else {
|
||||
limit_and_offset_unlimited(self.page, self.limit)
|
||||
// limit_and_offset_unlimited(self.page, self.limit)
|
||||
limit_and_offset(self.page, self.limit)?
|
||||
};
|
||||
|
||||
query = match self.sort.unwrap_or(CommentSortType::Hot) {
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 5a9d44656e2658ab7cb2dbec3fd1bfaf57654533
|
||||
Subproject commit f9ed0698944cb6d44dc733677a4634b7bc916536
|
Loading…
Reference in New Issue
Block a user