Skip to content
Snippets Groups Projects
Commit f489f212 authored by Andreas's avatar Andreas Committed by Adrien Béraud
Browse files

profile: vcard: fix add deletion logic check

If you are deleting a conversation with yourself, you
should not delete your own vCard. This will cause your profile
picture to be removed, among other things.

GitLab: #1838
Change-Id: I2e6ec3e941e6fdef1bf9df24238e720a73aba6dd
parent 560f44f6
No related branches found
No related tags found
No related merge requests found
......@@ -887,7 +887,11 @@ ContactModelPimpl::slotContactRemoved(const QString& accountId,
}
}
storage::removeContactConversations(db, contactUri);
storage::removeProfile(linked.owner.id, contactUri);
if (linked.owner.profileInfo.uri != contactUri) {
// Add check to not remove your own vcard if you're deleting
// a conversation with yourself.
storage::removeProfile(linked.owner.id, contactUri);
}
contacts.remove(contactUri);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment