1
0
Fork 0
forked from alemi/upub

fix: show updated only if different from published

This commit is contained in:
əlemi 2024-06-22 06:13:15 +02:00
parent e79061c294
commit 669240b87f
Signed by: alemi
GPG key ID: A4895B84D311642C
2 changed files with 2 additions and 1 deletions

View file

@ -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))

View file

@ -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)