From 62e518673acad9a1b2e677b58b5a7defa5fd7a16 Mon Sep 17 00:00:00 2001 From: Daniel Nitsikopoulos Date: Sat, 25 Feb 2023 16:38:18 +1100 Subject: [PATCH] Allow photos as part of checkin --- lib/adamantium/micropub_request_parser.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/adamantium/micropub_request_parser.rb b/lib/adamantium/micropub_request_parser.rb index c63c005..0f9b127 100644 --- a/lib/adamantium/micropub_request_parser.rb +++ b/lib/adamantium/micropub_request_parser.rb @@ -103,7 +103,7 @@ module Adamantium new_params[:published_at] = published.to_s new_params[:post_type] = :checkin location = params.dig(:properties, :location).first[:properties] - new_params[:photos] = [] + new_params[:photos] = checkin.dig(:properties, :photo)&.map { |p| {value: v, alt: new_params[:name]} } || [] new_params[:location] = "geo:#{location.dig(:latitude).first},#{location.dig(:longitude).first};u=0" new_params end