QXmpp::Client::StanzaReceived Struct

struct QXmpp::Client::StanzaReceived
Header: #include <QXmppClientExtension.h>
Since: QXmpp 1.18

Detailed Description

Hook run for each incoming stanza that is not handled by the stream itself, e.g. IQs, presences and messages. Decrypted IQ requests are passed with their e2eeMetadata, it is std::nullopt for stanzas that were not end-to-end encrypted. Handlers that only handle unencrypted stanzas must ignore the others, so they do not reply unencrypted.

Handlers returning QXmpp::HookResult::Stop handle the stanza, it is not processed further. Messages not handled by any handler are processed in the message pipeline (see QXmpp::Messages), use QXmpp::Messages::Received to process parsed and decrypted messages. For IQ requests not handled by any handler, an error is sent.

Implementations of the deprecated QXmppClientExtension::handleStanza() are called after the handlers.