From 9e34f63f7921ba68bd63efc851f5a87518a682b5 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 18 Mar 2024 16:41:36 +0300 Subject: ActivityPub: coalesce empty `cc` field to array --- src/main/java/com/juick/www/api/activity/model/Context.java | 1 + src/main/java/com/juick/www/api/activity/model/objects/Note.java | 1 + 2 files changed, 2 insertions(+) (limited to 'src/main') 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 212e2e28..0ec19ecc 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 @@ -75,6 +75,7 @@ public class Context implements Serializable { private String url; private List to; + @JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY) private List cc; private List tags; diff --git a/src/main/java/com/juick/www/api/activity/model/objects/Note.java b/src/main/java/com/juick/www/api/activity/model/objects/Note.java index 6792c34e..652bfa77 100644 --- a/src/main/java/com/juick/www/api/activity/model/objects/Note.java +++ b/src/main/java/com/juick/www/api/activity/model/objects/Note.java @@ -28,6 +28,7 @@ public class Note extends Context { private String inReplyTo; private List attachment; private List to; + @JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY) private List cc; private boolean sensitive; private Instant updated; -- cgit v1.2.3