From 524290e3bfd5a9f410eef90eb723972eb9a84b3e Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 1 Mar 2024 06:29:24 +0300 Subject: ActivityPub: add missing fields to Update activities to make Mastodon happy --- src/main/java/com/juick/www/api/activity/model/Context.java | 9 +++++++++ .../java/com/juick/www/api/activity/model/objects/Note.java | 10 ++++++++++ 2 files changed, 19 insertions(+) (limited to 'src/main/java/com/juick/www/api') 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 77c1fdcb..cfcc9379 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 @@ -72,6 +72,7 @@ public class Context implements Serializable { private String url; private List to; + private List cc; private List tags; @@ -163,4 +164,12 @@ public class Context implements Serializable { public void setIcon(Image icon) { this.icon = icon; } + + public List getCc() { + return cc; + } + + public void setCc(List cc) { + this.cc = cc; + } } 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 7889b172..465ad07c 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 @@ -20,6 +20,7 @@ package com.juick.www.api.activity.model.objects; import com.fasterxml.jackson.annotation.JsonFormat; import com.juick.www.api.activity.model.Context; +import java.time.Instant; import java.util.List; public class Note extends Context { @@ -30,6 +31,7 @@ public class Note extends Context { private List to; private List cc; private boolean sensitive; + private Instant updated; public String getContent() { return content; @@ -87,4 +89,12 @@ public class Note extends Context { public void setSensitive(boolean sensitive) { this.sensitive = sensitive; } + + public Instant getUpdated() { + return updated; + } + + public void setUpdated(Instant updated) { + this.updated = updated; + } } -- cgit v1.2.3