summaryrefslogtreecommitdiffstats
path: root/server/src/api/comment.rs
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2020-05-01 10:07:38 -0400
committerDessalines <tyhou13@gmx.com>2020-05-01 10:07:38 -0400
commit2f1cd9976dbdc034836a01748086056999aff52a (patch)
tree8abfa5764773ba91923794590468c5c52b460303 /server/src/api/comment.rs
parent461114c143aebf02f70de2b21d8b1272f67f12a2 (diff)
Adding federated community, comment, and post deletes.
- Unit tests added too. - No undeletes working yet.
Diffstat (limited to 'server/src/api/comment.rs')
-rw-r--r--server/src/api/comment.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/src/api/comment.rs b/server/src/api/comment.rs
index 17b52d2f..961ef0c1 100644
--- a/server/src/api/comment.rs
+++ b/server/src/api/comment.rs
@@ -337,14 +337,14 @@ impl Perform for Oper<EditComment> {
Err(_e) => return Err(APIError::err("couldnt_update_comment").into()),
};
- updated_comment.send_update(&user, &conn)?;
-
if let Some(deleted) = data.deleted.to_owned() {
if deleted {
updated_comment.send_delete(&user, &conn)?;
} else {
// TODO: undo delete
}
+ } else {
+ updated_comment.send_update(&user, &conn)?;
}
let mut recipient_ids = Vec::new();