aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main/java/com/juick')
-rw-r--r--juick-server/src/main/java/com/juick/server/api/activity/Profile.java5
-rw-r--r--juick-server/src/main/java/com/juick/server/api/activity/model/Image.java22
-rw-r--r--juick-server/src/main/java/com/juick/server/api/activity/model/Person.java6
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 19b1271b..4a44db3b 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 00000000..9a3b1659
--- /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 626ac309..d3e99bcc 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;
}