-
Notifications
You must be signed in to change notification settings - Fork 271
Add support for provisioning and basic synchronisation #21
Conversation
- Use SignalServiceAddress.DEFAULT_DEVICE_ID as default deviceId instead of -1 to indicate master device - Enable sending messages to your own from a device other than the master device
Hi, Is there a reason that this PR is not merged @moxie0 ? |
Thanks for your interest @Turakar but a 1k line diff is a little big for your first contribution to the project. I'd suggest starting with smaller contributions to get a feel for the project, we'd ultimately like to implement this functionality another way. Thanks again. |
i am working on fixing signalapp/Signal-Android#5102 (could you unlock the conversation, btw? it would be great to have a place to ask for reviews and opinions) and rely on the features implemented by this PR. Can we convince you somehow to have a second look? This diff is not that huge, if you ignore changed import statements. |
Thanks @Trolldemorted but I think that's a bigger PR than we'd merge at this point. I'd recommend focusing on getting smaller PRs in first, getting a better feel for the code base, and getting a better understanding of all the complexities. |
@moxie0 (How) was this functionally implemented meanwhile? |
There a two new methods introduced to the public part of the API:
The user first calls getNewDeviceUuid() and uses this uuid and a public key from a randomly generated IdentityKeyPair to create a QR code with the text:
tsdevice:/?uuid=[uuid]&pub_key=[public key Base64 encoded and URL safe]
Then the user calls finishNewDeviceRegistration() which blocks until the device is verified(that means scanned by the app). After that he can continue with setPreKeys().
The API is now also capable of serializing RequestMessages and deserializing the reply (contacts, groups and blocked lists). As contacts and group syncs are attachments, the code for reading them has to be written by your own. This can be done using the DeviceContactsInputStream or DeviceGroupsInputStream. I also fixed bugs regarding the library not being the primary device.
Tested and working:
If you think that this is ready, I can sign the CLA.