diff --git a/lib/archive_importer/contact_importer.rb b/lib/archive_importer/contact_importer.rb index b64dfe7b7..492375691 100644 --- a/lib/archive_importer/contact_importer.rb +++ b/lib/archive_importer/contact_importer.rb @@ -34,7 +34,7 @@ class ArchiveImporter def create_contact person = Person.by_account_identifier(json.fetch("account_id")) - user.contacts.create!(person_id: person.id, sharing: json.fetch("sharing"), receiving: json.fetch("receiving")) + user.contacts.create!(person_id: person.id, sharing: false, receiving: json.fetch("receiving")) end end end diff --git a/spec/integration/migration_service_spec.rb b/spec/integration/migration_service_spec.rb index c4c306afa..f8cb79f98 100644 --- a/spec/integration/migration_service_spec.rb +++ b/spec/integration/migration_service_spec.rb @@ -287,17 +287,17 @@ describe MigrationService do contact = user.contacts.find_by(person: Person.by_account_identifier(contact1_diaspora_id)) expect(contact).not_to be_nil - expect(contact.sharing).to be_truthy + expect(contact.sharing).to be_falsey expect(contact.receiving).to be_falsey contact = user.contacts.find_by(person: Person.by_account_identifier(contact2_diaspora_id)) expect(contact).not_to be_nil - expect(contact.sharing).to be_truthy + expect(contact.sharing).to be_falsey expect(contact.receiving).to be_truthy contact = user.contacts.find_by(person: Person.by_account_identifier(migrated_contact_new_diaspora_id)) expect(contact).not_to be_nil - expect(contact.sharing).to be_truthy + expect(contact.sharing).to be_falsey expect(contact.receiving).to be_truthy aspect = user.aspects.find_by(name: "Friends")