Add detailed follow notifications

This commit is contained in:
Tim
2025-07-10 17:58:13 +08:00
parent 49ccbb5dc7
commit f4b161dbee
4 changed files with 107 additions and 28 deletions

View File

@@ -83,7 +83,14 @@ public class PostService {
// notify followers of author
for (User u : subscriptionService.getSubscribers(author.getUsername())) {
if (!u.getId().equals(author.getId())) {
notificationService.createNotification(u, NotificationType.USER_ACTIVITY, post, null, null);
notificationService.createNotification(
u,
NotificationType.FOLLOWED_POST,
post,
null,
null,
author,
null);
}
}
return post;