summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp/src/signal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/WhatsApp/src/signal.cpp')
-rw-r--r--protocols/WhatsApp/src/signal.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/protocols/WhatsApp/src/signal.cpp b/protocols/WhatsApp/src/signal.cpp
index 39b0347eae..1c92fffdea 100644
--- a/protocols/WhatsApp/src/signal.cpp
+++ b/protocols/WhatsApp/src/signal.cpp
@@ -537,15 +537,12 @@ signal_buffer* MSignalStore::encryptSignalProto(const WAJid &to, const MBinBuffe
MBinBuffer MSignalStore::encodeSignedIdentity(bool bIncludeSignatureKey)
{
- proto::ADVSignedDeviceIdentity identity;
- identity << pProto->getBlob("WAAccount");
+ proto::ADVSignedDeviceIdentity identity(pProto->getBlob("WAAccount"));
if (!bIncludeSignatureKey)
- identity.clear_accountsignaturekey();
+ proto::CleanBinary(identity.accountsignaturekey), identity.has_accountsignaturekey = false;
- MBinBuffer res(identity.ByteSize());
- identity.SerializeToArray(res.data(), (int)res.length());
- return res;
+ return proto::Serialize(identity);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -578,6 +575,6 @@ void MSignalStore::generatePrekeys(int count)
/////////////////////////////////////////////////////////////////////////////////////////
-void MSignalStore::processSenderKeyMessage(const proto::Message_SenderKeyDistributionMessage &)
+void MSignalStore::processSenderKeyMessage(const Wa__Message__SenderKeyDistributionMessage *)
{
}