diff options
Diffstat (limited to 'juick-server/src/main/java/com')
3 files changed, 28 insertions, 5 deletions
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 19b1271b5..4a44db3bb 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,8 +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())); - Link avatar = new Link(); - avatar.setHref(imgBuilder.toUriString()); + Image avatar = new Image(); + avatar.setUrl(imgBuilder.toUriString()); + avatar.setMediaType("image/png"); person.setIcon(avatar); return person; } diff --git a/juick-server/src/main/java/com/juick/server/api/activity/model/Image.java b/juick-server/src/main/java/com/juick/server/api/activity/model/Image.java new file mode 100644 index 000000000..9a3b16590 --- /dev/null +++ b/juick-server/src/main/java/com/juick/server/api/activity/model/Image.java @@ -0,0 +1,22 @@ +package com.juick.server.api.activity.model; + +public class Image extends ActivityObject { + private String mediaType; + private String url; + + public String getMediaType() { + return mediaType; + } + + public void setMediaType(String mediaType) { + this.mediaType = mediaType; + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } +} 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 626ac3098..d3e99bcc9 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 Link icon; + private Image icon; private String inbox; private String outbox; @@ -20,11 +20,11 @@ public class Person extends ActivityObject { this.name = name; } - public Link getIcon() { + public Image getIcon() { return icon; } - public void setIcon(Link icon) { + public void setIcon(Image icon) { this.icon = icon; } |