Fix: DistributionWorkerでString to Integerのエラーが出る問題 (#344)

* Fix: DeliveryWorkerでString to Integerのエラーが出る問題

* Test: Mastodon v3向け
This commit is contained in:
KMY(雪あすか) 2023-12-11 14:13:33 +09:00 committed by KMY
parent 0838f1ac8f
commit 9e22306574
2 changed files with 7 additions and 1 deletions

View file

@ -40,6 +40,7 @@ class InstanceInfo < ApplicationRecord
return false if info.nil?
return true if EMOJI_REACTION_AVAILABLE_SOFTWARES.include?(info['software'])
return false if info.data['metadata'].nil? || !info.data['metadata'].is_a?(Hash)
features = info.data.dig('metadata', 'features')
return false if features.nil? || !features.is_a?(Array)