From d9116efb858984c050ed0cf121c1191baf50ed34 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Wed, 29 Sep 2021 01:58:12 +0200 Subject: [PATCH] Revert #8254 This reverts commit 123b8b906cce08a1020c7d960e569cc56cabd349. This reverts commit 60f9dbcdbd2c8d2217c9496926fd17cd53e2906b. --- lib/archive_importer/contact_importer.rb | 2 +- spec/integration/migration_service_spec.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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")