From bf5ae7357bc2348264dfe09d9264238f6decd2c5 Mon Sep 17 00:00:00 2001 From: Melvin Keskin Date: Thu, 19 Mar 2020 21:17:52 +0100 Subject: Do not include 'ask' attribute when renaming roster item --- src/client/QXmppRosterManager.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/client') diff --git a/src/client/QXmppRosterManager.cpp b/src/client/QXmppRosterManager.cpp index 7bba45ec..9da4fd8f 100644 --- a/src/client/QXmppRosterManager.cpp +++ b/src/client/QXmppRosterManager.cpp @@ -282,6 +282,10 @@ bool QXmppRosterManager::renameItem(const QString &bareJid, const QString &name) QXmppRosterIq::Item item = d->entries.value(bareJid); item.setName(name); + // If there is a pending subscription, do not include the corresponding attribute in the stanza. + if (!item.subscriptionStatus().isEmpty()) + item.setSubscriptionStatus({}); + QXmppRosterIq iq; iq.setType(QXmppIq::Set); iq.addItem(item); -- cgit v1.2.3