1
0
Fork 0
forked from alemi/upub

fix: when missing embedded object still show url!

This commit is contained in:
əlemi 2024-03-27 04:28:09 +01:00
parent fe30ad59d7
commit 625b8e0e02
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -66,10 +66,14 @@ pub async fn page(
.set_ordered_items(Node::array( .set_ordered_items(Node::array(
items items
.into_iter() .into_iter()
.map(|(a, o)| .map(|(a, o)| {
let oid = a.object.clone();
super::super::activity::ap_activity(a) super::super::activity::ap_activity(a)
.set_object(Node::maybe_object(o.map(super::super::object::ap_object))) .set_object(match o {
) Some(o) => Node::object(super::super::object::ap_object(o)),
None => Node::maybe_link(oid),
})
})
.collect() .collect()
)) ))
.ld_context() .ld_context()