From e5d29b9d2fd37ffcf51485182c9ebe36494db381 Mon Sep 17 00:00:00 2001 From: Daniel Nitsikopoulos Date: Sat, 25 Feb 2023 12:58:10 +1100 Subject: [PATCH] Set default content --- 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 7fc5613..8efcba0 100644 --- a/lib/adamantium/micropub_request_parser.rb +++ b/lib/adamantium/micropub_request_parser.rb @@ -95,7 +95,7 @@ module Adamantium new_params[:h] = "entry" new_params[:syndication_sources] = params.dig(:properties, :syndication) new_params[:name] = checkin.dig(:properties, :name).first - new_params[:content] = params.dig(:properties, :content)&.first + new_params[:content] = params.dig(:properties, :content)&.first || "" new_params[:url] = checkin.dig(:properties, :url)&.first new_params[:slug] = SecureRandom.uuid new_params[:category] = params.dig(:properties, :category)