diff --git a/iris b/iris index 0534923b5..eef87be61 160000 --- a/iris +++ b/iris @@ -1 +1 @@ -Subproject commit 0534923b5a81e11d80867bb7e7f5dd5e70f48091 +Subproject commit eef87be6171a7851775c8924f7b7d871d6126af3 diff --git a/src/infodlg.cpp b/src/infodlg.cpp index 57ba1529c..0809730ca 100644 --- a/src/infodlg.cpp +++ b/src/infodlg.cpp @@ -731,6 +731,15 @@ void InfoWidget::publish() } }); + bool hasAvaConv = account()->client()->serverInfoManager()->accountFeatures().hasAvatarConversion(); + if (!hasAvaConv) { + v.detach(); + if (d->photo.size()) { + v.setPhoto(VCard4::UriValue { d->photo, d->photoMime }); + } + VCardFactory::instance()->setVCard(d->pa, v, target, flags | VCardFactory::ForceVCardTemp); + } + if (d->type == Self) { // publish or retract avatar depending on d->photo contents d->pa->avatarFactory()->setSelfAvatar(QImage::fromData(d->photo)); diff --git a/src/vcardfactory.cpp b/src/vcardfactory.cpp index 192c21465..d3e19765d 100644 --- a/src/vcardfactory.cpp +++ b/src/vcardfactory.cpp @@ -231,7 +231,8 @@ VCard4::VCard VCardFactory::vcard(const Jid &j, Flags flags) */ Task *VCardFactory::setVCard(PsiAccount *account, const VCard4::VCard &v, const Jid &targetJid, Flags flags) { - if ((flags & MucRoom)) { // || !account->client()->serverInfoManager()->hasPersistentStorage()) { + if ((flags & MucRoom) || (flags & ForceVCardTemp)) { + // || !account->client()->serverInfoManager()->hasPersistentStorage()) { JT_VCard *jtVCard_ = new JT_VCard(account->client()->rootTask()); connect(jtVCard_, &JT_VCard::finished, this, [this, v, jtVCard_, flags]() { if (jtVCard_->success()) {