diff options
Diffstat (limited to 'src/client/QXmppClient.cpp')
| -rw-r--r-- | src/client/QXmppClient.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/client/QXmppClient.cpp b/src/client/QXmppClient.cpp index 2af1274d..0b14bc68 100644 --- a/src/client/QXmppClient.cpp +++ b/src/client/QXmppClient.cpp @@ -409,6 +409,25 @@ QFuture<QXmpp::SendResult> QXmppClient::sendUnencrypted(QXmppStanza &&stanza) } /// +/// Sends the stanza with the same encryption as \p e2eeMetadata. +/// +/// When there is no e2eeMetadata given this always sends the stanza without +/// end-to-end encryption. +/// Intended to be used for replies to IQs and messages. +/// +/// \since QXmpp 1.5 +/// +QFuture<QXmpp::SendResult> QXmppClient::reply(QXmppStanza &&stanza, const std::optional<QXmppE2eeMetadata> &e2eeMetadata) +{ + // This should pick the right e2ee manager as soon as multiple encryptions + // in parallel are supported. + if (e2eeMetadata) { + return send(std::move(stanza)); + } + return sendUnencrypted(std::move(stanza)); +} + +/// /// Sends an IQ packet and returns the response asynchronously. /// /// This is useful for further processing and parsing of the returned |
