Skip to content

Commit

Permalink
OmemoManager: Do not set e2ee extension on behalf of the user
Browse files Browse the repository at this point in the history
  • Loading branch information
lnjX committed Feb 25, 2024
1 parent 68ffe9e commit 2832457
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions src/omemo/QXmppOmemoManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1222,8 +1222,6 @@ bool Manager::handleMessage(const QXmppMessage &message)
/// \cond
void Manager::onRegistered(QXmppClient *client)
{
client->setEncryptionExtension(this);

d->trustManager = client->findExtension<QXmppTrustManager>();
if (!d->trustManager) {
qFatal("QXmppTrustManager is not available, it must be added to the client before adding QXmppOmemoManager");
Expand Down
1 change: 1 addition & 0 deletions tests/qxmppomemomanager/tst_qxmppomemomanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ void tst_QXmppOmemoManager::initOmemoUser(OmemoUser &omemoUser)
omemoUser.omemoStorage = std::make_unique<QXmppOmemoMemoryStorage>();
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);
Expand Down

2 comments on commit 2832457

@melvo
Copy link
Contributor

@melvo melvo commented on 2832457 Mar 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lnjX What was the reason for that and is it documented somewhere?

@lnjX
Copy link
Member Author

@lnjX lnjX commented on 2832457 Mar 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I overlooked this, when I reviewed the omemo manager. When designing the encryption extensions, it wasn't my intention that the extension would control the client and register/activate itself.

But, yes, you're right I forgot to document it, I pushed 68869ce now.

Please sign in to comment.