diff options
Diffstat (limited to 'src/main/java/com/juick/server/api/activity')
-rw-r--r-- | src/main/java/com/juick/server/api/activity/model/Context.java | 4 | ||||
-rw-r--r-- | src/main/java/com/juick/server/api/activity/model/objects/Person.java | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/com/juick/server/api/activity/model/Context.java b/src/main/java/com/juick/server/api/activity/model/Context.java index d617f99be..687848cc9 100644 --- a/src/main/java/com/juick/server/api/activity/model/Context.java +++ b/src/main/java/com/juick/server/api/activity/model/Context.java @@ -60,6 +60,10 @@ public abstract class Context { this.id = id; } + public String getType() { + return getClass().getSimpleName(); + } + @JsonProperty("@context") @JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY) public List<Object> getContext() { diff --git a/src/main/java/com/juick/server/api/activity/model/objects/Person.java b/src/main/java/com/juick/server/api/activity/model/objects/Person.java index a6fd9a766..2d3a45d7d 100644 --- a/src/main/java/com/juick/server/api/activity/model/objects/Person.java +++ b/src/main/java/com/juick/server/api/activity/model/objects/Person.java @@ -14,6 +14,11 @@ public class Person extends Context { private String followers; private Key publicKey; + @Override + public String getType() { + return "Person"; + } + public String getName() { return name; } |