Fix commetns
This commit is contained in:
parent
71aa6ffffe
commit
4cb6b6a5a3
1 changed files with 2 additions and 1 deletions
|
|
@ -126,6 +126,7 @@ public class CommentController {
|
|||
.build();
|
||||
|
||||
Comment saved = commentRepository.save(comment);
|
||||
commentRepository.flush(); // Ensure @CreationTimestamp is applied
|
||||
|
||||
log.info("User {} commented on activity {}", user.getUsername(), activityId);
|
||||
|
||||
|
|
@ -144,7 +145,7 @@ public class CommentController {
|
|||
noteObject.put("attributedTo", actorUri);
|
||||
noteObject.put("inReplyTo", activityUri);
|
||||
noteObject.put("content", escapeHtml(saved.getContent()));
|
||||
noteObject.put("published", saved.getCreatedAt().toString());
|
||||
noteObject.put("published", java.time.Instant.now().toString());
|
||||
|
||||
if (activity.getVisibility() == Activity.Visibility.PUBLIC) {
|
||||
noteObject.put("to", List.of("https://www.w3.org/ns/activitystreams#Public"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue