diff options
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/api/activity/model')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/api/activity/model/ActivityObject.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/juick-server/src/main/java/com/juick/server/api/activity/model/ActivityObject.java b/juick-server/src/main/java/com/juick/server/api/activity/model/ActivityObject.java index 84a3e018..fceb3612 100644 --- a/juick-server/src/main/java/com/juick/server/api/activity/model/ActivityObject.java +++ b/juick-server/src/main/java/com/juick/server/api/activity/model/ActivityObject.java @@ -9,6 +9,8 @@ import java.util.List; public abstract class ActivityObject { + private List<String> context; + private String id; private Instant published; @@ -27,7 +29,7 @@ public abstract class ActivityObject { @JsonProperty("@context") public List<String> getContext() { - return Arrays.asList(ACTIVITY_STREAMS_URI, SECURITY_URI); + return context; } public final static String ACTIVITY_STREAMS_URI = "https://www.w3.org/ns/activitystreams"; @@ -42,4 +44,9 @@ public abstract class ActivityObject { public void setPublished(Instant published) { this.published = published; } + + public static ActivityObject build(ActivityObject response) { + response.context = Arrays.asList(ACTIVITY_STREAMS_URI, SECURITY_URI); + return response; + } } |