From 897fa78e89c967aba5b4e4cc7dd950b9174091a4 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Wed, 24 Apr 2019 10:11:55 -0700 Subject: [PATCH] Bugfix - Only update the modified time on the comment if its not mark as read --- server/src/websocket_server/server.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/websocket_server/server.rs b/server/src/websocket_server/server.rs index d7b934163..84536c53d 100644 --- a/server/src/websocket_server/server.rs +++ b/server/src/websocket_server/server.rs @@ -1355,8 +1355,8 @@ impl Perform for EditComment { creator_id: self.creator_id, removed: self.removed.to_owned(), read: self.read.to_owned(), - updated: Some(naive_now()) - }; + updated: if self.read.is_some() { None } else {Some(naive_now())} + }; let _updated_comment = match Comment::update(&conn, self.edit_id, &comment_form) { Ok(comment) => comment,