aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/www/api
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2021-08-23 15:04:09 +0300
committerGravatar Vitaly Takmazov2021-08-23 15:04:09 +0300
commita44510ff17ac6e099ceed9401a62d6d66366c73d (patch)
treee69576a1f74d43c9b778d66d0aa357316087a8f0 /src/main/java/com/juick/www/api
parentf7ebc8831b032196e6695fa22647717a7bf2b55c (diff)
ActivityPub: send Update event on user profile updates
Diffstat (limited to 'src/main/java/com/juick/www/api')
-rw-r--r--src/main/java/com/juick/www/api/Users.java2
1 files changed, 2 insertions, 0 deletions
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));
}
}