Skip to content
Snippets Groups Projects
Unverified Commit ec26847a authored by Sébastien Blin's avatar Sébastien Blin
Browse files

contactmodel: don't reset presence on confirmed

Change-Id: I78cfa458d16aabe1e73223848e06ee90ccae9fc4
parent ea8140fc
Branches
No related tags found
No related merge requests found
......@@ -615,12 +615,15 @@ ContactModelPimpl::slotNewBuddySubscription(const QString& contactUri, bool stat
void
ContactModelPimpl::slotContactAdded(const QString& accountId, const QString& contactUri, bool confirmed)
{
Q_UNUSED(confirmed)
if (accountId != linked.owner.id) return;
auto contact = contacts.find(contactUri);
if (contact->profileInfo.type == profile::Type::PENDING) {
emit behaviorController.trustRequestTreated(linked.owner.id, contactUri);
} else if (contact->profileInfo.type == profile::Type::RING && !contact->isBanned && confirmed) {
// This means that the peer accepted the trust request. We don't need to re-add the contact
// a second time (and this reset the presence to false).
return;
}
bool isBanned = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment