mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-29 00:42:19 +00:00
Merge pull request #3965 from SleeplessOne1917/comment-fix
Display deleted or removed comments when they have children
This commit is contained in:
commit
e181f4f41d
24
Cargo.lock
generated
24
Cargo.lock
generated
|
@ -2606,7 +2606,7 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lemmy_api"
|
name = "lemmy_api"
|
||||||
version = "0.18.1"
|
version = "0.18.4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"activitypub_federation",
|
"activitypub_federation",
|
||||||
"actix-web",
|
"actix-web",
|
||||||
|
@ -2636,7 +2636,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lemmy_api_common"
|
name = "lemmy_api_common"
|
||||||
version = "0.18.1"
|
version = "0.18.4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"activitypub_federation",
|
"activitypub_federation",
|
||||||
"actix-web",
|
"actix-web",
|
||||||
|
@ -2668,7 +2668,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lemmy_api_crud"
|
name = "lemmy_api_crud"
|
||||||
version = "0.18.1"
|
version = "0.18.4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"activitypub_federation",
|
"activitypub_federation",
|
||||||
"actix-web",
|
"actix-web",
|
||||||
|
@ -2689,7 +2689,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lemmy_apub"
|
name = "lemmy_apub"
|
||||||
version = "0.18.1"
|
version = "0.18.4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"activitypub_federation",
|
"activitypub_federation",
|
||||||
"actix-web",
|
"actix-web",
|
||||||
|
@ -2726,7 +2726,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lemmy_db_schema"
|
name = "lemmy_db_schema"
|
||||||
version = "0.18.1"
|
version = "0.18.4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"activitypub_federation",
|
"activitypub_federation",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
|
@ -2762,7 +2762,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lemmy_db_views"
|
name = "lemmy_db_views"
|
||||||
version = "0.18.1"
|
version = "0.18.4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix-web",
|
"actix-web",
|
||||||
"diesel",
|
"diesel",
|
||||||
|
@ -2780,7 +2780,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lemmy_db_views_actor"
|
name = "lemmy_db_views_actor"
|
||||||
version = "0.18.1"
|
version = "0.18.4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"diesel",
|
"diesel",
|
||||||
|
@ -2793,7 +2793,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lemmy_db_views_moderator"
|
name = "lemmy_db_views_moderator"
|
||||||
version = "0.18.1"
|
version = "0.18.4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"diesel",
|
"diesel",
|
||||||
"diesel-async",
|
"diesel-async",
|
||||||
|
@ -2805,7 +2805,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lemmy_federate"
|
name = "lemmy_federate"
|
||||||
version = "0.18.1"
|
version = "0.18.4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"activitypub_federation",
|
"activitypub_federation",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
|
@ -2837,7 +2837,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lemmy_routes"
|
name = "lemmy_routes"
|
||||||
version = "0.18.1"
|
version = "0.18.4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"activitypub_federation",
|
"activitypub_federation",
|
||||||
"actix-web",
|
"actix-web",
|
||||||
|
@ -2862,7 +2862,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lemmy_server"
|
name = "lemmy_server"
|
||||||
version = "0.18.1"
|
version = "0.18.4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"activitypub_federation",
|
"activitypub_federation",
|
||||||
"actix-cors",
|
"actix-cors",
|
||||||
|
@ -2909,7 +2909,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lemmy_utils"
|
name = "lemmy_utils"
|
||||||
version = "0.18.1"
|
version = "0.18.4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix-web",
|
"actix-web",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
|
|
24
Cargo.toml
24
Cargo.toml
|
@ -1,5 +1,5 @@
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "0.18.1"
|
version = "0.18.4"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "A link aggregator for the fediverse"
|
description = "A link aggregator for the fediverse"
|
||||||
license = "AGPL-3.0"
|
license = "AGPL-3.0"
|
||||||
|
@ -58,16 +58,16 @@ members = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
lemmy_api = { version = "=0.18.1", path = "./crates/api" }
|
lemmy_api = { version = "=0.18.4", path = "./crates/api" }
|
||||||
lemmy_api_crud = { version = "=0.18.1", path = "./crates/api_crud" }
|
lemmy_api_crud = { version = "=0.18.4", path = "./crates/api_crud" }
|
||||||
lemmy_apub = { version = "=0.18.1", path = "./crates/apub" }
|
lemmy_apub = { version = "=0.18.4", path = "./crates/apub" }
|
||||||
lemmy_utils = { version = "=0.18.1", path = "./crates/utils" }
|
lemmy_utils = { version = "=0.18.4", path = "./crates/utils" }
|
||||||
lemmy_db_schema = { version = "=0.18.1", path = "./crates/db_schema" }
|
lemmy_db_schema = { version = "=0.18.4", path = "./crates/db_schema" }
|
||||||
lemmy_api_common = { version = "=0.18.1", path = "./crates/api_common" }
|
lemmy_api_common = { version = "=0.18.4", path = "./crates/api_common" }
|
||||||
lemmy_routes = { version = "=0.18.1", path = "./crates/routes" }
|
lemmy_routes = { version = "=0.18.4", path = "./crates/routes" }
|
||||||
lemmy_db_views = { version = "=0.18.1", path = "./crates/db_views" }
|
lemmy_db_views = { version = "=0.18.4", path = "./crates/db_views" }
|
||||||
lemmy_db_views_actor = { version = "=0.18.1", path = "./crates/db_views_actor" }
|
lemmy_db_views_actor = { version = "=0.18.4", path = "./crates/db_views_actor" }
|
||||||
lemmy_db_views_moderator = { version = "=0.18.1", path = "./crates/db_views_moderator" }
|
lemmy_db_views_moderator = { version = "=0.18.4", path = "./crates/db_views_moderator" }
|
||||||
activitypub_federation = { version = "0.5.0-beta.3", default-features = false, features = [
|
activitypub_federation = { version = "0.5.0-beta.3", default-features = false, features = [
|
||||||
"actix-web",
|
"actix-web",
|
||||||
] }
|
] }
|
||||||
|
@ -168,4 +168,4 @@ prometheus = { version = "0.13.3", features = ["process"], optional = true }
|
||||||
actix-web-prom = { version = "0.6.0", optional = true }
|
actix-web-prom = { version = "0.6.0", optional = true }
|
||||||
serial_test = { workspace = true }
|
serial_test = { workspace = true }
|
||||||
clap = { version = "4.3.19", features = ["derive"] }
|
clap = { version = "4.3.19", features = ["derive"] }
|
||||||
lemmy_federate = { version = "0.18.1", path = "crates/federate" }
|
lemmy_federate = { version = "0.18.4", path = "crates/federate" }
|
||||||
|
|
|
@ -198,21 +198,6 @@ fn queries<'a>() -> Queries<
|
||||||
query = query.filter(comment_like::score.eq(-1));
|
query = query.filter(comment_like::score.eq(-1));
|
||||||
}
|
}
|
||||||
|
|
||||||
let is_creator = options.creator_id == options.local_user.map(|l| l.person.id);
|
|
||||||
// only show deleted comments to creator
|
|
||||||
if !is_creator {
|
|
||||||
query = query.filter(comment::deleted.eq(false));
|
|
||||||
}
|
|
||||||
|
|
||||||
let is_admin = options
|
|
||||||
.local_user
|
|
||||||
.map(|l| l.local_user.admin)
|
|
||||||
.unwrap_or(false);
|
|
||||||
// only show removed comments to admin when viewing user profile
|
|
||||||
if !(options.is_profile_view && is_admin) {
|
|
||||||
query = query.filter(comment::removed.eq(false));
|
|
||||||
}
|
|
||||||
|
|
||||||
if !options
|
if !options
|
||||||
.local_user
|
.local_user
|
||||||
.map(|l| l.local_user.show_bot_accounts)
|
.map(|l| l.local_user.show_bot_accounts)
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 1c42c579460871de7b4ea18e58dc25543b80d289
|
Subproject commit 839f1097d07ba9d730e31f58c892de491442e490
|
|
@ -25,7 +25,7 @@ services:
|
||||||
|
|
||||||
lemmy:
|
lemmy:
|
||||||
# use "image" to pull down an already compiled lemmy. make sure to comment out "build".
|
# use "image" to pull down an already compiled lemmy. make sure to comment out "build".
|
||||||
# image: dessalines/lemmy:0.18.1
|
# image: dessalines/lemmy:0.18.4
|
||||||
# platform: linux/x86_64 # no arm64 support. uncomment platform if using m1.
|
# platform: linux/x86_64 # no arm64 support. uncomment platform if using m1.
|
||||||
# use "build" to build your local lemmy server image for development. make sure to comment out "image".
|
# use "build" to build your local lemmy server image for development. make sure to comment out "image".
|
||||||
# run: docker compose up --build
|
# run: docker compose up --build
|
||||||
|
@ -55,7 +55,7 @@ services:
|
||||||
|
|
||||||
lemmy-ui:
|
lemmy-ui:
|
||||||
# use "image" to pull down an already compiled lemmy-ui. make sure to comment out "build".
|
# use "image" to pull down an already compiled lemmy-ui. make sure to comment out "build".
|
||||||
image: dessalines/lemmy-ui:0.18.1
|
image: dessalines/lemmy-ui:0.18.4
|
||||||
# platform: linux/x86_64 # no arm64 support. uncomment platform if using m1.
|
# platform: linux/x86_64 # no arm64 support. uncomment platform if using m1.
|
||||||
# use "build" to build your local lemmy ui image for development. make sure to comment out "image".
|
# use "build" to build your local lemmy ui image for development. make sure to comment out "image".
|
||||||
# run: docker compose up --build
|
# run: docker compose up --build
|
||||||
|
|
Loading…
Reference in a new issue