1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-09-10 12:03:18 +02:00

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
This commit is contained in:
Andreas 2025-02-16 13:58:47 -05:00 committed by Adrien Béraud
parent 560f44f6f1
commit f489f21271

View file

@ -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);
}
}