diff --git a/app/entities/bookmark_request.rb b/app/entities/bookmark_request.rb index ff926c6..05bda65 100644 --- a/app/entities/bookmark_request.rb +++ b/app/entities/bookmark_request.rb @@ -10,6 +10,7 @@ module Adamantium attribute :category, Types::Array.of(Types::Coercible::String) attribute :published_at, Types::Nominal::DateTime.optional attribute :post_type, Types::Coercible::String + attribute :syndicate_to, Types::Array.of(Types::Coercible::String) end end end diff --git a/app/entities/post_request.rb b/app/entities/post_request.rb index fba64a8..f7e517f 100644 --- a/app/entities/post_request.rb +++ b/app/entities/post_request.rb @@ -9,6 +9,7 @@ module Adamantium attribute :category, Types::Array.of(Types::Coercible::String) attribute :published_at, Types::Nominal::DateTime.optional attribute :post_type, Types::Coercible::String + attribute :syndicate_to, Types::Array.of(Types::Coercible::String) end end end diff --git a/config/settings.rb b/config/settings.rb index 326a98a..9934856 100644 --- a/config/settings.rb +++ b/config/settings.rb @@ -25,5 +25,8 @@ module Adamantium setting :micropub_authorization_endpoint setting :micropub_token_endpoint + + setting :mastodon_token, default: nil + setting :mastodon_server, default: nil end end diff --git a/lib/adamantium/micropub_request_parser.rb b/lib/adamantium/micropub_request_parser.rb index cb7b360..177745c 100644 --- a/lib/adamantium/micropub_request_parser.rb +++ b/lib/adamantium/micropub_request_parser.rb @@ -51,6 +51,7 @@ module Adamantium new_params[:h] = "entry" new_params[:post_type] = post_type new_params[:action] = params[:action] + new_params[:syndicate_to] = params["syndicate-to"] publish_time = params[:published_at] || Time.now