From adca0f0a58c233ca0a6089dfd9c074f783f539e5 Mon Sep 17 00:00:00 2001 From: Daniel Nitsikopoulos Date: Sat, 4 Feb 2023 14:27:06 +1100 Subject: [PATCH] Use photos var --- lib/adamantium/syndication/mastodon.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/adamantium/syndication/mastodon.rb b/lib/adamantium/syndication/mastodon.rb index 6e5f92b..55b2018 100644 --- a/lib/adamantium/syndication/mastodon.rb +++ b/lib/adamantium/syndication/mastodon.rb @@ -28,8 +28,8 @@ module Adamantium key = Digest::MD5.hexdigest text_with_tags mastodon_token = settings.mastodon_token mastodon_server = settings.mastodon_server.split("@").first - logger.info("Photos: #{post[:photo].inspect}") - media_ids = post[:photo]&.map do |photo| + logger.info("Photos: #{post[:photos].inspect}") + media_ids = post[:photos]&.map do |photo| file = Tempfile.new(SecureRandom.uuid) file.write(URI.open(photo["value"]).read) file.rewind