Fix hash access

This commit is contained in:
2023-02-04 13:50:17 +11:00
parent 41a06c5ab5
commit e8cb8ca5d7

View File

@@ -31,7 +31,7 @@ module Adamantium
media_ids = post[:photos]&.map do |photo|
file = Tempfile.new(SecureRandom.uuid)
file.write(URI.open(photo[:value]).read)
file.write(URI.open(photo["value"]).read)
file.rewind
response = HTTParty.post("#{mastodon_server}api/v2/media", {
headers: {
@@ -39,7 +39,7 @@ module Adamantium
},
body: {
file: file.read,
description: photo[:alt]
description: photo["alt"]
}
})
file.close