Merge pull request #3965 from SleeplessOne1917/comment-fix

Display deleted or removed comments when they have children
This commit is contained in:
SleeplessOne1917 2023-09-24 18:29:40 +00:00 committed by GitHub
commit e181f4f41d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 27 additions and 42 deletions

24
Cargo.lock generated
View File

@ -2606,7 +2606,7 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]]
name = "lemmy_api"
version = "0.18.1"
version = "0.18.4"
dependencies = [
"activitypub_federation",
"actix-web",
@ -2636,7 +2636,7 @@ dependencies = [
[[package]]
name = "lemmy_api_common"
version = "0.18.1"
version = "0.18.4"
dependencies = [
"activitypub_federation",
"actix-web",
@ -2668,7 +2668,7 @@ dependencies = [
[[package]]
name = "lemmy_api_crud"
version = "0.18.1"
version = "0.18.4"
dependencies = [
"activitypub_federation",
"actix-web",
@ -2689,7 +2689,7 @@ dependencies = [
[[package]]
name = "lemmy_apub"
version = "0.18.1"
version = "0.18.4"
dependencies = [
"activitypub_federation",
"actix-web",
@ -2726,7 +2726,7 @@ dependencies = [
[[package]]
name = "lemmy_db_schema"
version = "0.18.1"
version = "0.18.4"
dependencies = [
"activitypub_federation",
"async-trait",
@ -2762,7 +2762,7 @@ dependencies = [
[[package]]
name = "lemmy_db_views"
version = "0.18.1"
version = "0.18.4"
dependencies = [
"actix-web",
"diesel",
@ -2780,7 +2780,7 @@ dependencies = [
[[package]]
name = "lemmy_db_views_actor"
version = "0.18.1"
version = "0.18.4"
dependencies = [
"chrono",
"diesel",
@ -2793,7 +2793,7 @@ dependencies = [
[[package]]
name = "lemmy_db_views_moderator"
version = "0.18.1"
version = "0.18.4"
dependencies = [
"diesel",
"diesel-async",
@ -2805,7 +2805,7 @@ dependencies = [
[[package]]
name = "lemmy_federate"
version = "0.18.1"
version = "0.18.4"
dependencies = [
"activitypub_federation",
"anyhow",
@ -2837,7 +2837,7 @@ dependencies = [
[[package]]
name = "lemmy_routes"
version = "0.18.1"
version = "0.18.4"
dependencies = [
"activitypub_federation",
"actix-web",
@ -2862,7 +2862,7 @@ dependencies = [
[[package]]
name = "lemmy_server"
version = "0.18.1"
version = "0.18.4"
dependencies = [
"activitypub_federation",
"actix-cors",
@ -2909,7 +2909,7 @@ dependencies = [
[[package]]
name = "lemmy_utils"
version = "0.18.1"
version = "0.18.4"
dependencies = [
"actix-web",
"anyhow",

View File

@ -1,5 +1,5 @@
[workspace.package]
version = "0.18.1"
version = "0.18.4"
edition = "2021"
description = "A link aggregator for the fediverse"
license = "AGPL-3.0"
@ -58,16 +58,16 @@ members = [
]
[workspace.dependencies]
lemmy_api = { version = "=0.18.1", path = "./crates/api" }
lemmy_api_crud = { version = "=0.18.1", path = "./crates/api_crud" }
lemmy_apub = { version = "=0.18.1", path = "./crates/apub" }
lemmy_utils = { version = "=0.18.1", path = "./crates/utils" }
lemmy_db_schema = { version = "=0.18.1", path = "./crates/db_schema" }
lemmy_api_common = { version = "=0.18.1", path = "./crates/api_common" }
lemmy_routes = { version = "=0.18.1", path = "./crates/routes" }
lemmy_db_views = { version = "=0.18.1", path = "./crates/db_views" }
lemmy_db_views_actor = { version = "=0.18.1", path = "./crates/db_views_actor" }
lemmy_db_views_moderator = { version = "=0.18.1", path = "./crates/db_views_moderator" }
lemmy_api = { version = "=0.18.4", path = "./crates/api" }
lemmy_api_crud = { version = "=0.18.4", path = "./crates/api_crud" }
lemmy_apub = { version = "=0.18.4", path = "./crates/apub" }
lemmy_utils = { version = "=0.18.4", path = "./crates/utils" }
lemmy_db_schema = { version = "=0.18.4", path = "./crates/db_schema" }
lemmy_api_common = { version = "=0.18.4", path = "./crates/api_common" }
lemmy_routes = { version = "=0.18.4", path = "./crates/routes" }
lemmy_db_views = { version = "=0.18.4", path = "./crates/db_views" }
lemmy_db_views_actor = { version = "=0.18.4", path = "./crates/db_views_actor" }
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 = [
"actix-web",
] }
@ -168,4 +168,4 @@ prometheus = { version = "0.13.3", features = ["process"], optional = true }
actix-web-prom = { version = "0.6.0", optional = true }
serial_test = { workspace = true }
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" }

View File

@ -198,21 +198,6 @@ fn queries<'a>() -> Queries<
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
.local_user
.map(|l| l.local_user.show_bot_accounts)

@ -1 +1 @@
Subproject commit 1c42c579460871de7b4ea18e58dc25543b80d289
Subproject commit 839f1097d07ba9d730e31f58c892de491442e490

View File

@ -25,7 +25,7 @@ services:
lemmy:
# 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.
# use "build" to build your local lemmy server image for development. make sure to comment out "image".
# run: docker compose up --build
@ -55,7 +55,7 @@ services:
lemmy-ui:
# 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.
# use "build" to build your local lemmy ui image for development. make sure to comment out "image".
# run: docker compose up --build