From 9c9f4d1ecffad1187db4c29977f94cb857615ab2 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 5 Sep 2018 10:20:49 +0300 Subject: ActivityStreams: Person icon is Link --- .../src/main/java/com/juick/server/api/activity/Profile.java | 4 +++- .../src/main/java/com/juick/server/api/activity/model/Person.java | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'juick-server/src/main/java') diff --git a/juick-server/src/main/java/com/juick/server/api/activity/Profile.java b/juick-server/src/main/java/com/juick/server/api/activity/Profile.java index 150d57a2..19b1271b 100644 --- a/juick-server/src/main/java/com/juick/server/api/activity/Profile.java +++ b/juick-server/src/main/java/com/juick/server/api/activity/Profile.java @@ -47,7 +47,9 @@ public class Profile { person.setOutbox(outboxBuilder.path(String.format("/u/%s/blog", userName)).toUriString()); UriComponentsBuilder imgBuilder = UriComponentsBuilder.fromUriString(baseImagesUri); imgBuilder.path(String.format("/a/%d.png", user.getUid())); - person.setIcon(imgBuilder.toUriString()); + Link avatar = new Link(); + avatar.setHref(imgBuilder.toUriString()); + person.setIcon(avatar); return person; } throw new HttpNotFoundException(); diff --git a/juick-server/src/main/java/com/juick/server/api/activity/model/Person.java b/juick-server/src/main/java/com/juick/server/api/activity/model/Person.java index 2dda9d4a..626ac309 100644 --- a/juick-server/src/main/java/com/juick/server/api/activity/model/Person.java +++ b/juick-server/src/main/java/com/juick/server/api/activity/model/Person.java @@ -3,7 +3,7 @@ package com.juick.server.api.activity.model; public class Person extends ActivityObject { private String name; - private String icon; + private Link icon; private String inbox; private String outbox; @@ -20,11 +20,11 @@ public class Person extends ActivityObject { this.name = name; } - public String getIcon() { + public Link getIcon() { return icon; } - public void setIcon(String icon) { + public void setIcon(Link icon) { this.icon = icon; } -- cgit v1.2.3