diff options
Diffstat (limited to 'src/main/java/com/juick/www/api/activity')
-rw-r--r-- | src/main/java/com/juick/www/api/activity/Profile.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/com/juick/www/api/activity/Profile.java b/src/main/java/com/juick/www/api/activity/Profile.java index 3dc717e9..045e919d 100644 --- a/src/main/java/com/juick/www/api/activity/Profile.java +++ b/src/main/java/com/juick/www/api/activity/Profile.java @@ -105,13 +105,15 @@ public class Profile { private WebApp webApp; @Inject private Remark remarkConverter; + @Inject + private User serviceUser; @GetMapping(value = "/u/{userName}", produces = { Context.LD_JSON_MEDIA_TYPE, Context.ACTIVITYSTREAMS_PROFILE_MEDIA_TYPE, Context.FALLBACK_JSON_MEDIA_TYPE }) public Actor getUser(@PathVariable String userName) { User user = userService.getUserByName(userName); if (!user.isAnonymous()) { - Actor profile = userService.isServiceUser(user) ? new Application() : new Person(); + Actor profile = user.equals(serviceUser) ? new Application() : new Person(); profile.setId(activityPubManager.personUri(user)); profile.setUrl(activityPubManager.personWebUri(user)); profile.setName(userName); |