diff options
author | Vitaly Takmazov | 2021-08-20 12:34:09 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2021-08-20 12:34:09 +0300 |
commit | 880535098d71e80944bbc6496cba692d68c342b6 (patch) | |
tree | 2f480b21cf568bf9ad2baf9ee6c02fcc50fd85be /src/main/java | |
parent | 6bd8371f8629bba8edaeb10e2648a5cf0177cd2b (diff) |
ActivityPub: fix contexts serialization
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/com/juick/www/api/activity/model/Context.java | 5 |
1 files changed, 2 insertions, 3 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 5d945749..a9d61617 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 @@ -26,8 +26,8 @@ import com.juick.www.api.activity.model.objects.*; import java.time.Instant; import java.util.ArrayList; import java.util.Arrays; -import java.util.Collections; import java.util.List; +import java.util.Map; @JsonIgnoreProperties(ignoreUnknown = true) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property="type") @@ -115,8 +115,7 @@ public abstract class Context { public static Context build(Context response) { response.context = new ArrayList<>(Arrays.asList(ACTIVITY_STREAMS_URI, SECURITY_URI)); - response.context.add(Collections.singletonMap("Hashtag", "as:Hashtag")); - response.context.add(Collections.singletonMap("sensitive", "as:sensitive")); + response.context.add(Map.of("Hashtag", "as:Hashtag", "sensitive", "as:sensitive")); return response; } |