Closed aebruno closed 8 years ago
Thanks, this looks good! I'll try reviewing and merging this soon. AFAIK OWS do not have iOS devices syncing because they lacked the resources for iOS development.
Sounds great. Let me know if you'd like anything changed. Contact syncing is the other piece to this and looks like it's done via SyncMessages. I'm working on fleshing this out as well and will perhaps submit a separate PR for that.
@janimo I added support for SyncMessages to this PR which was the final piece to getting device linking working. Contact/Group syncing is now working as well as the various Sync message types. I tested this with Signal-Desktop and things seem to be working nicely.
Tried my best not to make these changes too invasive. No changes were made to the public facing client API. I had to refactor buildAndSendMessages slightly to support the new textsecure.Content proto. I also added a new config option to allow users to turn off device syncing completely.
Let me know what you think and if you'd like anything changed.
Sorry I had no time to review this - I am pretty busy and distracted right now, but your changes are great, appreciated and will be merged one way or another :) cheers nd good luck with the Sailfish client!
Thanks! Sounds great and no rush at all.
Sorry for the delay. Fixed up sync.go to use bytes.Buffer and changed fmt to log. Let me know if you spot anything else.
First thanks for the excellent library. This pull request is a first cut at supporting device linking. It's based off the code in libsignal-service-java. Added support for fetching linked devices, linking a new device, and removing a device. I did some initial testing using Signal-Desktop in a development environment and seems to be working (aside from contact syncing). I added an example of how the client API would work into
cmd/textsecure/main.go
command. Basically, you fire up Signal-Desktop scan the QR code and pass in the URL:If all goes well, to see linked devices you can run:
Currently, it looks like Open Whisper Systems only supports device linking for Android, so it may be worth contacting them at some point to ensure this wouldn't be in violation of their terms, etc.
That all being said, I am in no way a crypto expert but hope this PR can at least serve as starting point. Feedback welcome!
Thanks again for the awesome work on this library.