Include remote registrationId in encryption result
The signal service requires this field to accompany outgoing ciphertexts. With this change we can likely remove the correspinding getter from SessionCipher.
This commit is contained in:
parent
fbc6554d6f
commit
dd4e8375cd
13
dist/libsignal-protocol.js
vendored
13
dist/libsignal-protocol.js
vendored
@ -36124,9 +36124,18 @@ SessionCipher.prototype = {
|
||||
|
||||
preKeyMsg.message = message;
|
||||
var result = String.fromCharCode((3 << 4) | 3) + util.toString(preKeyMsg.encode());
|
||||
return {type: 3, body: result};
|
||||
return {
|
||||
type : 3,
|
||||
body : result,
|
||||
registrationId : record.registrationId
|
||||
};
|
||||
|
||||
} else {
|
||||
return {type: 1, body: util.toString(message)};
|
||||
return {
|
||||
type : 1,
|
||||
body : util.toString(message),
|
||||
registrationId : record.registrationId
|
||||
};
|
||||
}
|
||||
});
|
||||
}.bind(this));
|
||||
|
||||
@ -94,9 +94,18 @@ SessionCipher.prototype = {
|
||||
|
||||
preKeyMsg.message = message;
|
||||
var result = String.fromCharCode((3 << 4) | 3) + util.toString(preKeyMsg.encode());
|
||||
return {type: 3, body: result};
|
||||
return {
|
||||
type : 3,
|
||||
body : result,
|
||||
registrationId : record.registrationId
|
||||
};
|
||||
|
||||
} else {
|
||||
return {type: 1, body: util.toString(message)};
|
||||
return {
|
||||
type : 1,
|
||||
body : util.toString(message),
|
||||
registrationId : record.registrationId
|
||||
};
|
||||
}
|
||||
});
|
||||
}.bind(this));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user