libsignal-protocol-javascript
libsignal-protocol-javascript copied to clipboard
SessionCipher::encrypt setting wrong registrationId?
I believe there is an error when building the message to be sent in SessionCipher::encrypt
.
https://github.com/signalapp/libsignal-protocol-javascript/blob/f5a838f1ccc9bddb5e93b899a63de2dea9670e10/src/SessionCipher.js#L112 and https://github.com/signalapp/libsignal-protocol-javascript/blob/f5a838f1ccc9bddb5e93b899a63de2dea9670e10/src/SessionCipher.js#L119
set the registrationId
of the message to be posted. This should be the sender's ID, and the ID in the session is, AFAIK, always the remote ID, which in this case is the recipient. So I think these lines should be using the value myRegistrationId
like in https://github.com/signalapp/libsignal-protocol-javascript/blob/f5a838f1ccc9bddb5e93b899a63de2dea9670e10/src/SessionCipher.js#L99
Or am I just missing something?
This should be the sender's ID,
Why do you think it should be the sender's registration id?
As I understand, this is the message that the recipient is going to receive, and this information is given to allow them to instantiate a SessionCipher
. Is this not the case?