Merge remote-tracking branch 'parent/main' into upstream-20240327

This commit is contained in:
KMY 2024-03-27 12:13:55 +09:00
commit ace193fda3
75 changed files with 435 additions and 462 deletions

View file

@ -111,12 +111,14 @@ class Form::Import
csv_converter = lambda do |field, field_info|
case field_info.header
when 'Show boosts', 'Notify on new posts', 'Hide notifications'
ActiveModel::Type::Boolean.new.cast(field)
ActiveModel::Type::Boolean.new.cast(field&.downcase)
when 'Languages'
field&.split(',')&.map(&:strip)&.presence
when 'Account address'
field.strip.gsub(/\A@/, '')
when '#domain', '#uri', 'List name'
when '#domain'
field&.strip&.downcase
when '#uri', 'List name'
field.strip
else
field