diff --git a/server/lemmy_db/src/comment.rs b/server/lemmy_db/src/comment.rs index 10d5ee92c..c462db1bb 100644 --- a/server/lemmy_db/src/comment.rs +++ b/server/lemmy_db/src/comment.rs @@ -166,7 +166,9 @@ impl Comment { use crate::schema::comment::dsl::*; insert_into(comment) .values(comment_form) - .on_conflict_do_nothing() + .on_conflict(ap_id) + .do_update() + .set(comment_form) .get_result::(conn) } } diff --git a/server/lemmy_db/src/post.rs b/server/lemmy_db/src/post.rs index 026435cb8..177659eb9 100644 --- a/server/lemmy_db/src/post.rs +++ b/server/lemmy_db/src/post.rs @@ -183,7 +183,9 @@ impl Post { use crate::schema::post::dsl::*; insert_into(post) .values(post_form) - .on_conflict_do_nothing() + .on_conflict(ap_id) + .do_update() + .set(post_form) .get_result::(conn) } }