mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
fix: pub key type is buffer
This commit is contained in:
@@ -17,7 +17,7 @@ class SenderKeyDistributionMessage extends CiphertextMessage {
|
||||
|
||||
const distributionMessage = protobufs.SenderKeyDistributionMessage.decode(
|
||||
message
|
||||
);
|
||||
).toJSON();
|
||||
this.serialized = serialized;
|
||||
this.id = distributionMessage.id;
|
||||
this.iteration = distributionMessage.iteration;
|
||||
|
||||
@@ -17,8 +17,8 @@ class SenderKeyMessage extends CiphertextMessage {
|
||||
const version = serialized[0];
|
||||
const message = serialized.slice(1, serialized.length - this.SIGNATURE_LENGTH);
|
||||
const signature = serialized.slice(-1 * this.SIGNATURE_LENGTH);
|
||||
const senderKeyMessage = protobufs.SenderKeyMessage.decode(message);
|
||||
senderKeyMessage.ciphertext = senderKeyMessage.ciphertext;
|
||||
const senderKeyMessage = protobufs.SenderKeyMessage.decode(message).toJSON();
|
||||
senderKeyMessage.ciphertext = Buffer.from(senderKeyMessage.ciphertext, 'base64');
|
||||
|
||||
this.serialized = serialized;
|
||||
this.messageVersion = (version & 0xff) >> 4;
|
||||
|
||||
Reference in New Issue
Block a user