From fbc852112728a54c9729a6d9f12e3fd430cabf1e Mon Sep 17 00:00:00 2001 From: Linus Jahn Date: Wed, 28 Dec 2022 21:09:12 +0100 Subject: PubSubEvent: Split up Items type into Items and virtual Retract type This makes the handling much easier because you don't have to manually check whether the set 'Items' type means items have been published or retracted. There is no retract type in the XML representation, but that doesn't mean that we cannot distinguish both cases. Closes #521. --- src/client/QXmppPep_p.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/client') diff --git a/src/client/QXmppPep_p.h b/src/client/QXmppPep_p.h index c2891979..6ffac236 100644 --- a/src/client/QXmppPep_p.h +++ b/src/client/QXmppPep_p.h @@ -46,6 +46,9 @@ inline bool handlePubSubEvent(const QDomElement &element, const QString &pubSubS (manager->*itemReceived)(pubSubService, {}); } return true; + } else if (event.eventType() == QXmppPubSubEventBase::Retract) { + (manager->*itemReceived)(pubSubService, {}); + return true; } } return false; -- cgit v1.2.3