diff --git a/upub/core/src/model/actor.rs b/upub/core/src/model/actor.rs index 4628b7b2..36df4da8 100644 --- a/upub/core/src/model/actor.rs +++ b/upub/core/src/model/actor.rs @@ -168,6 +168,7 @@ impl Model { .set_url(apb::Node::link(i.clone())) ))) .set_published(Some(self.published)) + .set_updated(if self.updated != self.published { Some(self.updated) } else { None }) .set_preferred_username(Some(&self.preferred_username)) .set_statuses_count(Some(self.statuses_count as u64)) .set_followers_count(Some(self.followers_count as u64)) diff --git a/upub/core/src/model/object.rs b/upub/core/src/model/object.rs index d44f4674..e26b9ee7 100644 --- a/upub/core/src/model/object.rs +++ b/upub/core/src/model/object.rs @@ -155,7 +155,7 @@ impl Model { .set_conversation(apb::Node::maybe_link(self.context.clone())) // duplicate context for mastodon .set_in_reply_to(apb::Node::maybe_link(self.in_reply_to.clone())) .set_published(Some(self.published)) - .set_updated(Some(self.updated)) + .set_updated(if self.updated != self.published { Some(self.updated) } else { None }) .set_audience(apb::Node::maybe_link(self.audience)) .set_to(apb::Node::links(self.to.0.clone())) .set_bto(apb::Node::Empty)