Skip to content

Commit

Permalink
vcard4: use just urn:xmpp:vcard4
Browse files Browse the repository at this point in the history
  • Loading branch information
Ri0n committed Jun 20, 2024
1 parent 8efb20f commit 680633b
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/vcardfactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,7 @@ Task *VCardFactory::setVCard(PsiAccount *account, const VCard4::VCard &v, const
QDomDocument *doc = account->client()->doc();
QDomElement el = v.toXmlElement(*doc);

account->pepManager()->publish(QLatin1String(PEP_VCARD4_NODE), PubSubItem(QLatin1String("current"), el));
return account->pepManager()->publish(QLatin1String(CONTACTS_NODE), PubSubItem(account->jid().bare(), el),
PEPManager::PresenceAccess, true);
return account->pepManager()->publish(QLatin1String(PEP_VCARD4_NODE), PubSubItem(QLatin1String("current"), el));
}

/**
Expand Down Expand Up @@ -397,10 +395,7 @@ void VCardRequest::executeVCardTemp(PsiAccount *pa)

void VCardRequest::executePubSub(PsiAccount *pa)
{
auto isSelf = pa->jid().compare(d->jid, false);
auto node = isSelf ? CONTACTS_NODE : PEP_VCARD4_NODE;
auto id = isSelf ? pa->jid().bare() : QString::fromLatin1("current");
auto task = pa->pepManager()->get(d->jid, QLatin1String(node), id);
auto task = pa->pepManager()->get(d->jid, QLatin1String(PEP_VCARD4_NODE), QLatin1String("current"));
task->connect(task, &PEPGetTask::finished, this, [this, task, ppa = QPointer<PsiAccount>(pa)]() {
if (task->success()) {
if (!task->items().empty()) {
Expand Down

0 comments on commit 680633b

Please sign in to comment.