Skip to content
This repository has been archived by the owner on Aug 5, 2021. It is now read-only.

SessionCipher::encrypt setting wrong registrationId? #75

Open
vitoreiji opened this issue Aug 19, 2020 · 2 comments
Open

SessionCipher::encrypt setting wrong registrationId? #75

vitoreiji opened this issue Aug 19, 2020 · 2 comments

Comments

@vitoreiji
Copy link

I believe there is an error when building the message to be sent in SessionCipher::encrypt.

registrationId : session.registrationId
and
registrationId : session.registrationId

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
preKeyMsg.registrationId = myRegistrationId;

Or am I just missing something?

@michaelkirk
Copy link

This should be the sender's ID,

Why do you think it should be the sender's registration id?

@vitoreiji
Copy link
Author

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants