]> Untitled Git - lemmy.git/commitdiff
Bugfix - Only update the modified time on the comment if its not mark as read
authorDessalines <tyhou13@gmx.com>
Wed, 24 Apr 2019 17:11:55 +0000 (10:11 -0700)
committerDessalines <tyhou13@gmx.com>
Wed, 24 Apr 2019 17:11:55 +0000 (10:11 -0700)
server/src/websocket_server/server.rs

index d7b9341636bab83cbd2ae2c7cf2e17a5a9b976f8..84536c53dc0359df7443ab0dd6c2721cc925c6fb 100644 (file)
@@ -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,