summaryrefslogtreecommitdiff
path: root/src/main/java/eu
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/eu')
-rw-r--r--src/main/java/eu/mulk/mulkcms2/benki/posts/PostResource.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/eu/mulk/mulkcms2/benki/posts/PostResource.java b/src/main/java/eu/mulk/mulkcms2/benki/posts/PostResource.java
index d1e5775..569c535 100644
--- a/src/main/java/eu/mulk/mulkcms2/benki/posts/PostResource.java
+++ b/src/main/java/eu/mulk/mulkcms2/benki/posts/PostResource.java
@@ -344,6 +344,11 @@ public abstract class PostResource {
assignPostTargets(post.getVisibility(), post.owner, comment);
comment.persist();
+ var currentUser = getCurrentUser();
+ if (currentUser != null) {
+ comment.owner = currentUser;
+ }
+
var admins = User.findAdmins();
var mailText = Templates.commentNotificationMail(postId, comment);