cob: Implement comment edit action

This implementation intentionally preserves all edits such that
they may be displayed in an application as an edit history.

Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
This commit is contained in:
Alexis Sellier
2022-12-16 12:32:20 +01:00
parent 3d94893737
commit 10d450c751
+3 -3
View File
@@ -395,10 +395,10 @@ impl<'a> FromIterator<(&'a CommentId, &'a thread::Comment)> for Comments {
for (comment_id, comment) in iter {
comments.push(Comment {
author: Author { id: comment_id.1 },
body: comment.body.to_owned(),
body: comment.body().to_owned(),
reactions: [],
timestamp: comment.timestamp,
reply_to: comment.reply_to,
timestamp: comment.timestamp(),
reply_to: comment.reply_to(),
});
}