contactmodel: don't reset presence on confirmed

Change-Id: I78cfa458d16aabe1e73223848e06ee90ccae9fc4
parent ea8140fc
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment