aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-09-05 09:56:08 +0300
committerGravatar Vitaly Takmazov2018-09-05 09:56:08 +0300
commit59bc8edd8aed8362b787b11b0ab80b76079099ab (patch)
tree7a7e39ea64d9a97cd227fb05f1a522f71219330d
parent786d6eed2ff02f2a6bd874e7f919790d791caa8e (diff)
Add inbox to person metadata
-rw-r--r--juick-server/src/main/java/com/juick/server/api/activity/Profile.java3
-rw-r--r--juick-server/src/main/java/com/juick/server/api/activity/model/Person.java9
2 files changed, 12 insertions, 0 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 8311c862..150d57a2 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
@@ -40,6 +40,9 @@ public class Profile {
builder.path(String.format("/u/%s", userName));
person.setId(builder.toUriString());
person.setName(userName);
+ UriComponentsBuilder inboxBuilder = UriComponentsBuilder.fromUriString(baseUri);
+ inboxBuilder.path("/post");
+ person.setInbox(inboxBuilder.toUriString());
UriComponentsBuilder outboxBuilder = UriComponentsBuilder.fromUriString(baseUri);
person.setOutbox(outboxBuilder.path(String.format("/u/%s/blog", userName)).toUriString());
UriComponentsBuilder imgBuilder = UriComponentsBuilder.fromUriString(baseImagesUri);
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 7ec94c28..2dda9d4a 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
@@ -4,6 +4,7 @@ public class Person extends ActivityObject {
private String name;
private String icon;
+ private String inbox;
private String outbox;
@Override
@@ -34,4 +35,12 @@ public class Person extends ActivityObject {
public void setOutbox(String outbox) {
this.outbox = outbox;
}
+
+ public String getInbox() {
+ return inbox;
+ }
+
+ public void setInbox(String inbox) {
+ this.inbox = inbox;
+ }
}