Allow de-syndication of posts that don't have a target saved

This commit is contained in:
2024-03-09 18:05:09 +11:00
parent ce18d419c8
commit 9f1a662191

View File

@@ -13,7 +13,11 @@ module Admin
request = if target.to_sym == :mastodon
masto_id = post.syndication_sources[target].split("/").last
mastodon.de_syndicate(post_id: masto_id)
if masto_id == ""
Success()
else
mastodon.de_syndicate(post_id: masto_id)
end
end
if request.success?