Skip to content

Commit 6ef6bf1

Browse files
committed
Avoid registering duplicate concern name across different comments
1 parent 2aaad35 commit 6ef6bf1

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/handlers/concern.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,7 @@ pub(super) async fn handle_command(
9191
match cmd {
9292
ConcernCommand::Concern { title } => {
9393
// Only add a concern if it wasn't already added, we could be in an edit
94-
if !concern_data
95-
.concerns
96-
.iter()
97-
.any(|c| c.title == title && c.comment_url == comment_url)
98-
{
94+
if !concern_data.concerns.iter().any(|c| c.title == title) {
9995
concern_data.concerns.push(Concern {
10096
title,
10197
status: ConcernStatus::Active,

0 commit comments

Comments
 (0)