aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-09-05 10:32:34 +0300
committerGravatar Vitaly Takmazov2018-09-05 10:32:34 +0300
commit58d8dd35de41d3e567a2d00765784e2bab39ddcd (patch)
treea57e0da7629e4674da91c4c9e0a2c8d6b4c50326 /juick-server/src/main/java/com
parent9c9f4d1ecffad1187db4c29977f94cb857615ab2 (diff)
ActivityStreams: Person icon is Image
Diffstat (limited to 'juick-server/src/main/java/com')
-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 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;
}