Post inline images when syndicating
This commit is contained in:
@@ -44,9 +44,12 @@ module Main
|
||||
return photos.first["url"]
|
||||
end
|
||||
|
||||
inline_images.first[1] if inline_images
|
||||
end
|
||||
|
||||
def inline_images
|
||||
doc = Nokogiri::HTML(content)
|
||||
images = doc.at("//img")
|
||||
images.first[1] if images
|
||||
doc.at("//img")
|
||||
end
|
||||
|
||||
def prefix_emoji
|
||||
|
@@ -36,7 +36,8 @@ module Micropub
|
||||
if req_entity && verify_scope(req: req, scope: :create)
|
||||
Dry::Matcher::ResultMatcher.call(create_entry.call(req_entity: req_entity)) do |m|
|
||||
m.success do |post|
|
||||
res.headers["Location"] = "#{settings.micropub_site_url}/#{post.value!.post_type}/#{post.value!.slug}"
|
||||
post_type = (post.value!.post_type == :bookmark) ? :bookmark : :post
|
||||
res.headers["Location"] = "#{settings.micropub_site_url}/#{post_type}/#{post.value!.slug}"
|
||||
res.status = 201
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user