Allow de-syndication of posts that don't have a target saved
This commit is contained in:
@@ -13,7 +13,11 @@ module Admin
|
|||||||
|
|
||||||
request = if target.to_sym == :mastodon
|
request = if target.to_sym == :mastodon
|
||||||
masto_id = post.syndication_sources[target].split("/").last
|
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
|
end
|
||||||
|
|
||||||
if request.success?
|
if request.success?
|
||||||
|
Reference in New Issue
Block a user