Skip to content

Commit

Permalink
OmemoManager: Move errors when passing them
Browse files Browse the repository at this point in the history
  • Loading branch information
melvo committed Sep 14, 2024
1 parent 1472e81 commit 3e53623
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/omemo/QXmppOmemoManager_p.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ QXmppTask<QXmppE2eeExtension::MessageEncryptResult> ManagerPrivate::encryptMessa
u"OMEMO manager must be started before encrypting"_s,
SendError::EncryptionError
};
interface.finish(error);
interface.finish(std::move(error));
} else {
recipientJids.append(ownBareJid());

Expand All @@ -968,7 +968,7 @@ QXmppTask<QXmppE2eeExtension::MessageEncryptResult> ManagerPrivate::encryptMessa
u"OMEMO element could not be created"_s,
QXmpp::SendError::EncryptionError,
};
interface.finish(error);
interface.finish(std::move(error));
} else {
// Messages with a body or trust messages use
// \xep{0380, Explicit Message Encryption} and a fallback body.
Expand Down Expand Up @@ -3558,7 +3558,7 @@ QXmppTask<QXmpp::SendResult> ManagerPrivate::sendEmptyMessage(const QString &rec
u"OMEMO envelope could not be created"_s,
SendError::EncryptionError
};
interface.finish(error);
interface.finish(std::move(error));
} else {
QXmppOmemoEnvelope omemoEnvelope;
omemoEnvelope.setRecipientDeviceId(recipientDeviceId);
Expand Down

0 comments on commit 3e53623

Please sign in to comment.