mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-10-30 07:53:33 +08:00
Compare commits
2 Commits
beta/20230
...
nightly/20
| Author | SHA1 | Date | |
|---|---|---|---|
| ebea6d9d65 | |||
| 7a9d0699dd |
@ -782,16 +782,9 @@ ContactModelPimpl::slotContactAdded(const QString& accountId,
|
|||||||
if (accountId != linked.owner.id)
|
if (accountId != linked.owner.id)
|
||||||
return;
|
return;
|
||||||
auto contact = contacts.find(contactUri);
|
auto contact = contacts.find(contactUri);
|
||||||
if (contact != contacts.end()) {
|
if (contact != contacts.end() && contact->profileInfo.type == profile::Type::PENDING)
|
||||||
if (contact->profileInfo.type == profile::Type::PENDING) {
|
Q_EMIT behaviorController.trustRequestTreated(linked.owner.id, contactUri);
|
||||||
Q_EMIT behaviorController.trustRequestTreated(linked.owner.id, contactUri);
|
|
||||||
} else if (contact->profileInfo.type == profile::Type::JAMI && !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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// for jams account we already have profile with avatar, use it to save to vCard
|
// for jams account we already have profile with avatar, use it to save to vCard
|
||||||
bool isJamsAccount = !linked.owner.confProperties.managerUri.isEmpty();
|
bool isJamsAccount = !linked.owner.confProperties.managerUri.isEmpty();
|
||||||
if (isJamsAccount) {
|
if (isJamsAccount) {
|
||||||
@ -925,7 +918,6 @@ ContactModelPimpl::addToContacts(const QString& contactUri,
|
|||||||
if (!lrc::api::Lrc::cacheAvatars.load())
|
if (!lrc::api::Lrc::cacheAvatars.load())
|
||||||
contactInfo.profileInfo.avatar.clear();
|
contactInfo.profileInfo.avatar.clear();
|
||||||
|
|
||||||
// lookup address in case of RING contact
|
|
||||||
if (type == profile::Type::JAMI) {
|
if (type == profile::Type::JAMI) {
|
||||||
ConfigurationManager::instance().lookupAddress(linked.owner.id, "", contactUri);
|
ConfigurationManager::instance().lookupAddress(linked.owner.id, "", contactUri);
|
||||||
PresenceManager::instance().subscribeBuddy(linked.owner.id, contactUri, !banned);
|
PresenceManager::instance().subscribeBuddy(linked.owner.id, contactUri, !banned);
|
||||||
|
|||||||
@ -68,7 +68,7 @@ convertMap(const std::map<std::string, std::string>& m)
|
|||||||
{
|
{
|
||||||
MapStringString temp;
|
MapStringString temp;
|
||||||
for (const auto& [key, value] : m) {
|
for (const auto& [key, value] : m) {
|
||||||
temp[QString(key.c_str())] = QString::fromLatin1(QByteArray::fromStdString(value));
|
temp[QString(key.c_str())] = QString(value.c_str());
|
||||||
}
|
}
|
||||||
return temp;
|
return temp;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user