Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename OmemoEnvelope's 'setIsUsedForKeyExchange()' to 'setUsedForKeyExchange()' #468

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/base/QXmppOmemoDataBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ bool QXmppOmemoEnvelope::isUsedForKeyExchange() const
///
/// \param isUsed whether a pre-key was used to prepare this envelope
///
void QXmppOmemoEnvelope::setIsUsedForKeyExchange(bool isUsed)
void QXmppOmemoEnvelope::setUsedForKeyExchange(bool isUsed)
{
m_isUsedForKeyExchange = isUsed;
}
Expand Down
2 changes: 1 addition & 1 deletion src/base/QXmppOmemoEnvelope_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class QXMPP_EXPORT QXmppOmemoEnvelope
void setRecipientDeviceId(uint32_t id);

bool isUsedForKeyExchange() const;
void setIsUsedForKeyExchange(bool isUsed);
void setUsedForKeyExchange(bool isUsed);

QByteArray data() const;
void setData(const QByteArray &data);
Expand Down
4 changes: 2 additions & 2 deletions src/omemo/QXmppOmemoManager_p.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ QFuture<std::optional<QXmppOmemoElement>> ManagerPrivate::encryptStanza(const T
QXmppOmemoEnvelope omemoEnvelope;
omemoEnvelope.setRecipientDeviceId(deviceId);
if (isKeyExchange) {
omemoEnvelope.setIsUsedForKeyExchange(true);
omemoEnvelope.setUsedForKeyExchange(true);
}
omemoEnvelope.setData(data);
omemoElement->addEnvelope(jid, omemoEnvelope);
Expand Down Expand Up @@ -3554,7 +3554,7 @@ QFuture<QXmpp::SendResult> ManagerPrivate::sendEmptyMessage(const QString &recip
QXmppOmemoEnvelope omemoEnvelope;
omemoEnvelope.setRecipientDeviceId(recipientDeviceId);
if (isKeyExchange) {
omemoEnvelope.setIsUsedForKeyExchange(true);
omemoEnvelope.setUsedForKeyExchange(true);
}
omemoEnvelope.setData(data);

Expand Down
4 changes: 2 additions & 2 deletions tests/qxmppomemodata/tst_qxmppomemodata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ void tst_QXmppOmemoData::testOmemoEnvelope()

QXmppOmemoEnvelope omemoEnvelope2;
omemoEnvelope2.setRecipientDeviceId(recipientDeviceId);
omemoEnvelope2.setIsUsedForKeyExchange(isUsedForKeyExchange);
omemoEnvelope2.setUsedForKeyExchange(isUsedForKeyExchange);
omemoEnvelope2.setData(QByteArray::fromBase64(data));
QCOMPARE(omemoEnvelope2.recipientDeviceId(), recipientDeviceId);
QCOMPARE(omemoEnvelope2.isUsedForKeyExchange(), isUsedForKeyExchange);
Expand Down Expand Up @@ -500,7 +500,7 @@ void tst_QXmppOmemoData::testOmemoElement()

QXmppOmemoEnvelope omemoEnvelope5;
omemoEnvelope5.setRecipientDeviceId(12321);
omemoEnvelope5.setIsUsedForKeyExchange(true);
omemoEnvelope5.setUsedForKeyExchange(true);
omemoEnvelope5.setData(QByteArray::fromBase64("a012U0R9WixWKUYhYipucnZOWG06akFOR3Q1NGNOOmUK"));
omemoElement2.addEnvelope(QStringLiteral("[email protected]"), omemoEnvelope5);

Expand Down