diff --git a/src/omemo/QXmppOmemoManager.cpp b/src/omemo/QXmppOmemoManager.cpp index 652ae4b62..a367c0ea4 100644 --- a/src/omemo/QXmppOmemoManager.cpp +++ b/src/omemo/QXmppOmemoManager.cpp @@ -1222,8 +1222,6 @@ bool Manager::handleMessage(const QXmppMessage &message) /// \cond void Manager::onRegistered(QXmppClient *client) { - client->setEncryptionExtension(this); - d->trustManager = client->findExtension(); if (!d->trustManager) { qFatal("QXmppTrustManager is not available, it must be added to the client before adding QXmppOmemoManager"); diff --git a/tests/qxmppomemomanager/tst_qxmppomemomanager.cpp b/tests/qxmppomemomanager/tst_qxmppomemomanager.cpp index 9d3d28e32..731476082 100644 --- a/tests/qxmppomemomanager/tst_qxmppomemomanager.cpp +++ b/tests/qxmppomemomanager/tst_qxmppomemomanager.cpp @@ -148,6 +148,7 @@ void tst_QXmppOmemoManager::initOmemoUser(OmemoUser &omemoUser) omemoUser.omemoStorage = std::make_unique(); omemoUser.manager = new QXmppOmemoManager(omemoUser.omemoStorage.get()); omemoUser.client.addExtension(omemoUser.manager); + omemoUser.client.setEncryptionExtension(omemoUser.manager); omemoUser.carbonManager = new QXmppCarbonManagerV2; omemoUser.client.addExtension(omemoUser.carbonManager);