misc: remove wrong logs

Change-Id: I4010660c6bef3af553019deb9bcabc65a4b484fc
This commit is contained in:
Sébastien Blin
2024-02-19 16:55:11 -05:00
parent 5371dac882
commit d40e884a1f

View File

@@ -246,39 +246,32 @@ ContactModel::getAddedTs(const QString& contactUri) const
void void
ContactModel::addContact(contact::Info contactInfo) ContactModel::addContact(contact::Info contactInfo)
{ {
qWarning() << "@@@@@XXX?";
auto& profile = contactInfo.profileInfo; auto& profile = contactInfo.profileInfo;
// If passed contact is a banned contact, call the daemon to unban it // If passed contact is a banned contact, call the daemon to unban it
auto it = std::find(pimpl_->bannedContacts.begin(), pimpl_->bannedContacts.end(), profile.uri); auto it = std::find(pimpl_->bannedContacts.begin(), pimpl_->bannedContacts.end(), profile.uri);
if (it != pimpl_->bannedContacts.end()) { if (it != pimpl_->bannedContacts.end()) {
qWarning() << "@@@@@XXX";
LC_DBG << QString("Unban-ing contact %1").arg(profile.uri); LC_DBG << QString("Unban-ing contact %1").arg(profile.uri);
ConfigurationManager::instance().addContact(owner.id, profile.uri); ConfigurationManager::instance().addContact(owner.id, profile.uri);
// bannedContacts will be updated in slotContactAdded // bannedContacts will be updated in slotContactAdded
return; return;
} }
qWarning() << "@@@@@XXX";
if ((owner.profileInfo.type != profile.type) if ((owner.profileInfo.type != profile.type)
and (profile.type == profile::Type::JAMI or profile.type == profile::Type::SIP)) { and (profile.type == profile::Type::JAMI or profile.type == profile::Type::SIP)) {
qWarning() << "@@@@@XXX";
LC_DBG << "ContactModel::addContact, types invalid."; LC_DBG << "ContactModel::addContact, types invalid.";
return; return;
} }
qWarning() << "@@@@@XXX";
MapStringString details = ConfigurationManager::instance() MapStringString details = ConfigurationManager::instance()
.getContactDetails(owner.id, contactInfo.profileInfo.uri); .getContactDetails(owner.id, contactInfo.profileInfo.uri);
// if contactInfo is already a contact for the daemon, type should be equals to RING // if contactInfo is already a contact for the daemon, type should be equals to RING
// if the user add a temporary item for a SIP account, should be directly transformed // if the user add a temporary item for a SIP account, should be directly transformed
qWarning() << "@@@@@XXX";
if ((!details.empty() && details.value("removed") == "0") if ((!details.empty() && details.value("removed") == "0")
|| (profile.type == profile::Type::TEMPORARY || (profile.type == profile::Type::TEMPORARY
&& owner.profileInfo.type == profile::Type::SIP)) && owner.profileInfo.type == profile::Type::SIP))
profile.type = owner.profileInfo.type; profile.type = owner.profileInfo.type;
qWarning() << "@@@@@XXX";
switch (profile.type) { switch (profile.type) {
case profile::Type::TEMPORARY: { case profile::Type::TEMPORARY: {
// make a temporary contact available for UI elements, it will be upgraded to // make a temporary contact available for UI elements, it will be upgraded to
@@ -286,7 +279,6 @@ ContactModel::addContact(contact::Info contactInfo)
std::lock_guard<std::mutex> lk(pimpl_->contactsMtx_); std::lock_guard<std::mutex> lk(pimpl_->contactsMtx_);
contactInfo.profileInfo.type = profile::Type::PENDING; contactInfo.profileInfo.type = profile::Type::PENDING;
pimpl_->contacts.insert(contactInfo.profileInfo.uri, contactInfo); pimpl_->contacts.insert(contactInfo.profileInfo.uri, contactInfo);
qWarning() << "@@@@@XXX";
ConfigurationManager::instance().addContact(owner.id, profile.uri); ConfigurationManager::instance().addContact(owner.id, profile.uri);
ConfigurationManager::instance() ConfigurationManager::instance()
.sendTrustRequest(owner.id, .sendTrustRequest(owner.id,
@@ -295,21 +287,17 @@ ContactModel::addContact(contact::Info contactInfo)
return; return;
} }
case profile::Type::PENDING: case profile::Type::PENDING:
qWarning() << "@@@@@XXX";
return; return;
case profile::Type::JAMI: case profile::Type::JAMI:
case profile::Type::SIP: case profile::Type::SIP:
qWarning() << "@@@@@XXX";
break; break;
case profile::Type::INVALID: case profile::Type::INVALID:
case profile::Type::COUNT__: case profile::Type::COUNT__:
default: default:
qWarning() << "@@@@@XXX?";
LC_DBG << "ContactModel::addContact, cannot add contact with invalid type."; LC_DBG << "ContactModel::addContact, cannot add contact with invalid type.";
return; return;
} }
qWarning() << "@@@@@XXX";
storage::createOrUpdateProfile(owner.id, profile, true); storage::createOrUpdateProfile(owner.id, profile, true);
{ {