diff options
Diffstat (limited to 'src/main/java/com/juick/www/api/activity/converters')
-rw-r--r-- | src/main/java/com/juick/www/api/activity/converters/UserToActorConverter.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/com/juick/www/api/activity/converters/UserToActorConverter.java b/src/main/java/com/juick/www/api/activity/converters/UserToActorConverter.java index 405c27ab..435cb50d 100644 --- a/src/main/java/com/juick/www/api/activity/converters/UserToActorConverter.java +++ b/src/main/java/com/juick/www/api/activity/converters/UserToActorConverter.java @@ -1,8 +1,8 @@ package com.juick.www.api.activity.converters; +import com.juick.www.api.activity.helpers.ProfileUriBuilder; import org.springframework.core.convert.converter.Converter; -import com.juick.ActivityPubManager; import com.juick.KeystoreManager; import com.juick.model.User; import com.juick.www.WebApp; @@ -18,15 +18,15 @@ import lombok.AllArgsConstructor; @AllArgsConstructor public class UserToActorConverter implements Converter<User, Actor> { - private ActivityPubManager activityPubManager; + private ProfileUriBuilder profileUriBuilder; private KeystoreManager keystoreManager; private WebApp webApp; @Override public Actor convert(User user) { Actor profile = user.isService() ? new Application() : new Person(); - profile.setId(activityPubManager.personUri(user)); - profile.setUrl(activityPubManager.personWebUri(user)); + profile.setId(profileUriBuilder.personUri(user)); + profile.setUrl(profileUriBuilder.personWebUri(user)); profile.setName(user.getName()); profile.setPreferredUsername(user.getName()); Key publicKey = new Key(); @@ -34,10 +34,10 @@ public class UserToActorConverter implements Converter<User, Actor> { publicKey.setOwner(profile.getId()); publicKey.setPublicKeyPem(keystoreManager.getPublicKeyPem()); profile.setPublicKey(publicKey); - profile.setInbox(activityPubManager.inboxUri()); - profile.setOutbox(activityPubManager.outboxUri(user)); - profile.setFollowers(activityPubManager.followersUri(user)); - profile.setFollowing(activityPubManager.followingUri(user)); + profile.setInbox(profileUriBuilder.inboxUri()); + profile.setOutbox(profileUriBuilder.outboxUri(user)); + profile.setFollowers(profileUriBuilder.followersUri(user)); + profile.setFollowing(profileUriBuilder.followingUri(user)); Image avatar = new Image(); avatar.setUrl(webApp.getAvatarUrl(user)); avatar.setMediaType("image/png"); |