From e42b75f6dcd0a034dbc848c4371f9eab37a916e6 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 29 Feb 2024 11:00:14 -0500 Subject: [PATCH] Cleaning up mod action line. --- crates/apub/src/objects/post.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/apub/src/objects/post.rs b/crates/apub/src/objects/post.rs index 4652aacbf..47d7f53c6 100644 --- a/crates/apub/src/objects/post.rs +++ b/crates/apub/src/objects/post.rs @@ -212,9 +212,8 @@ impl Object for ApubPost { let first_attachment = page.attachment.first(); let form = if !page.is_mod_action(context).await? { - let first_attachment_url = first_attachment.cloned().map(Attachment::url); - let url = if first_attachment.is_some() { - first_attachment_url + let url = if let Some(attachment) = first_attachment.cloned() { + Some(attachment.url()) } else if page.kind == PageType::Video { // we cant display videos directly, so insert a link to external video page Some(page.id.inner().clone())