From 73c409fd0ffd05aea7e45eda80a8963ab292f37c 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 d7b93416..84536c53 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, -- 2.44.1