From 2374a6552b20302cb2f07e2140c7b0b2192ddd3b Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Tue, 7 Feb 2023 13:37:36 -0500 Subject: [PATCH] Clarify the logic for setting the URL --- MastodonIntent/Handler/SendPostIntentHandler.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MastodonIntent/Handler/SendPostIntentHandler.swift b/MastodonIntent/Handler/SendPostIntentHandler.swift index 8151ac635..9f17f13dd 100644 --- a/MastodonIntent/Handler/SendPostIntentHandler.swift +++ b/MastodonIntent/Handler/SendPostIntentHandler.swift @@ -97,7 +97,9 @@ extension SendPostIntentHandler: SendPostIntentHandling { subtitle: content, image: response.value.account.avatarImageURL().flatMap { INImage(url: $0) } ) - post.url = URL(string: response.value.url ?? "") + if let urlString = response.value.url { + post.url = URL(string: urlString) + } posts.append(post) } // end for in