This reverts commit 123b8b906c.
This reverts commit 60f9dbcdbd.
This commit is contained in:
Benjamin Neff 2021-09-29 01:58:12 +02:00
parent 274edf7589
commit d9116efb85
No known key found for this signature in database
GPG key ID: 971464C3F1A90194
2 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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")