From 59bc8edd8aed8362b787b11b0ab80b76079099ab Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 5 Sep 2018 09:56:08 +0300 Subject: Add inbox to person metadata --- .../src/main/java/com/juick/server/api/activity/Profile.java | 3 +++ .../main/java/com/juick/server/api/activity/model/Person.java | 9 +++++++++ 2 files changed, 12 insertions(+) (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 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; + } } -- cgit v1.2.3