Use photos var
This commit is contained in:
@@ -28,8 +28,8 @@ module Adamantium
|
|||||||
key = Digest::MD5.hexdigest text_with_tags
|
key = Digest::MD5.hexdigest text_with_tags
|
||||||
mastodon_token = settings.mastodon_token
|
mastodon_token = settings.mastodon_token
|
||||||
mastodon_server = settings.mastodon_server.split("@").first
|
mastodon_server = settings.mastodon_server.split("@").first
|
||||||
logger.info("Photos: #{post[:photo].inspect}")
|
logger.info("Photos: #{post[:photos].inspect}")
|
||||||
media_ids = post[:photo]&.map do |photo|
|
media_ids = post[:photos]&.map do |photo|
|
||||||
file = Tempfile.new(SecureRandom.uuid)
|
file = Tempfile.new(SecureRandom.uuid)
|
||||||
file.write(URI.open(photo["value"]).read)
|
file.write(URI.open(photo["value"]).read)
|
||||||
file.rewind
|
file.rewind
|
||||||
|
Reference in New Issue
Block a user