qxmpp-project / qxmpp

Cross-platform C++ XMPP client and server library
408 stars 197 forks source link

E2eeExtension: Return encrypted Stanza instead of QByteArray #513

Closed lnjX closed 1 year ago

lnjX commented 1 year ago

The client should be able to do post-processing on outgoing packets. It is currently not possible with encrypted packets from E2eeExtensions because they return QByteArray. This is because the type in QFutures must be copy-constructible and so we can't use a std::unique_ptr<QXmppStanza> to cover all classes inherited from QXmppStanza.

Solution: