Allow multiple photos for string URLs

This commit is contained in:
2024-04-24 20:51:26 +10:00
parent e83bf3e414
commit 05993db6ec

View File

@@ -106,7 +106,9 @@ module Micropub
}) })
else else
photos = if params[:photo].is_a?(String) photos = if params[:photo].is_a?(String)
[{value: params[:photo], alt: ""}] params[:photo].split(" ").map do |photo|
{value: photo, alt: ""}
end
elsif params[:photo].nil? elsif params[:photo].nil?
[] []
else else