aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/server/api/activity/model
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-09-10 23:37:15 +0300
committerGravatar Vitaly Takmazov2018-09-10 23:37:15 +0300
commita7bd0c5cd2330a84667b9762b4fd2cb35b1c20d4 (patch)
tree6d4a4e395a4e4c211f8372733cf87a431ccdb21d /juick-server/src/main/java/com/juick/server/api/activity/model
parentda66e1a4e3bd9a9c85d9eee691b31d78f66d6949 (diff)
fix ActivityPub context
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.java9
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;
+ }
}