From a44510ff17ac6e099ceed9401a62d6d66366c73d Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 23 Aug 2021 15:04:09 +0300 Subject: ActivityPub: send Update event on user profile updates --- src/main/java/com/juick/www/api/Users.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/main/java/com/juick/www/api') diff --git a/src/main/java/com/juick/www/api/Users.java b/src/main/java/com/juick/www/api/Users.java index 8743a275..030d8ced 100644 --- a/src/main/java/com/juick/www/api/Users.java +++ b/src/main/java/com/juick/www/api/Users.java @@ -26,6 +26,7 @@ import com.juick.util.HttpUtils; import com.juick.util.WebUtils; import com.juick.www.WebApp; import com.juick.service.*; +import com.juick.service.activities.UpdateUserEvent; import com.juick.service.component.MailVerificationEvent; import com.juick.service.security.annotation.Visitor; import org.apache.commons.io.IOUtils; @@ -175,6 +176,7 @@ public class Users { String avatarTmpPath = HttpUtils.receiveMultiPartFile(avatar, tmpDir).getHost(); if (StringUtils.isNotEmpty(avatarTmpPath)) { imagesService.saveAvatar(avatarTmpPath, visitor.getUid()); + applicationEventPublisher.publishEvent(new UpdateUserEvent(this, visitor)); } } -- cgit v1.2.3