diff options
author | Vitaly Takmazov | 2021-08-21 21:43:03 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2021-08-21 21:43:03 +0300 |
commit | e5c28b65b5d3ef2e5c98c71f55faa7c60d7864f0 (patch) | |
tree | de7547d2262b46b9c0f9e19f43dbb18dd19b01ce /src/main | |
parent | 389e29881724b90daa466247aef1b8a164511bb9 (diff) |
ActivityPub: do not duplicate type property
Diffstat (limited to 'src/main')
3 files changed, 1 insertions, 10 deletions
diff --git a/src/main/java/com/juick/www/api/activity/model/Context.java b/src/main/java/com/juick/www/api/activity/model/Context.java index fb726565..d7b23539 100644 --- a/src/main/java/com/juick/www/api/activity/model/Context.java +++ b/src/main/java/com/juick/www/api/activity/model/Context.java @@ -30,7 +30,7 @@ import java.util.List; import java.util.Map; @JsonIgnoreProperties(ignoreUnknown = true) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property="type") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property="type") @JsonSubTypes({ @JsonSubTypes.Type(value = Create.class, name = "Create"), @JsonSubTypes.Type(value = Update.class, name = "Update"), diff --git a/src/main/java/com/juick/www/api/activity/model/objects/Application.java b/src/main/java/com/juick/www/api/activity/model/objects/Application.java index 23a44e49..29361b33 100644 --- a/src/main/java/com/juick/www/api/activity/model/objects/Application.java +++ b/src/main/java/com/juick/www/api/activity/model/objects/Application.java @@ -18,8 +18,4 @@ package com.juick.www.api.activity.model.objects; public class Application extends SecurityObject { - @Override - public String getType() { - return "Application"; - } } diff --git a/src/main/java/com/juick/www/api/activity/model/objects/Person.java b/src/main/java/com/juick/www/api/activity/model/objects/Person.java index 52626833..84844510 100644 --- a/src/main/java/com/juick/www/api/activity/model/objects/Person.java +++ b/src/main/java/com/juick/www/api/activity/model/objects/Person.java @@ -29,11 +29,6 @@ public class Person extends SecurityObject { private String following; private String followers; - @Override - public String getType() { - return "Person"; - } - public String getName() { return name; } |