diff --git a/Changelog.md b/Changelog.md index 93735f234..066a2025e 100644 --- a/Changelog.md +++ b/Changelog.md @@ -32,7 +32,7 @@ Although the chat was never enabled per default and was marked as experimental, ## Features * Add client-side cropping of profile image uploads [#7581](https://github.com/diaspora/diaspora/pull/7581) * Add client-site rescaling of post images if they exceed the maximum possible size [#7734](https://github.com/diaspora/diaspora/pull/7734) -* Add backend for archive import [#7660](https://github.com/diaspora/diaspora/pull/7660) +* Add backend for archive import [#7660](https://github.com/diaspora/diaspora/pull/7660) [#8254](https://github.com/diaspora/diaspora/pull/8254) * For pods running PostgreSQL, make sure that no upper-case/mixed-case tags exist, and create a `lower(name)` index on tags to speed up ActsAsTaggableOn [#8206](https://github.com/diaspora/diaspora/pull/8206) * Allow podmins/moderators to see all local public posts to improve moderation [#8232](https://github.com/diaspora/diaspora/pull/8232) diff --git a/lib/archive_importer/contact_importer.rb b/lib/archive_importer/contact_importer.rb index 492375691..b64dfe7b7 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: false, receiving: json.fetch("receiving")) + user.contacts.create!(person_id: person.id, sharing: json.fetch("sharing"), receiving: json.fetch("receiving")) end end end diff --git a/spec/integration/migration_service_spec.rb b/spec/integration/migration_service_spec.rb index ce2bd47e5..49682527c 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_falsey + expect(contact.sharing).to be_truthy 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_falsey + expect(contact.sharing).to be_truthy 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_falsey + expect(contact.sharing).to be_truthy expect(contact.receiving).to be_truthy aspect = user.aspects.find_by(name: "Friends")