Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support contact discovery #200

Open
nanu-c opened this issue Feb 13, 2023 · 2 comments
Open

Support contact discovery #200

nanu-c opened this issue Feb 13, 2023 · 2 comments

Comments

@nanu-c
Copy link
Contributor

nanu-c commented Feb 13, 2023

This currently not possible and it looks like, it takes a lot of effort. I did some experiments but there is a lot todo.

@rubdos
Copy link
Member

rubdos commented Feb 14, 2023

There's also two sides to this, correct? Registration with PNI instead of plain phone number (which will, I assume, soon be mandatory), keeping that registration current, and then the lookup part.

Do you have some documentation on what needs to happen?

@nanu-c
Copy link
Contributor Author

nanu-c commented Feb 14, 2023

I am not sure, with "we need the pni". Actually it works now similar to the group directory.

  • Ask "/v2/directory/auth" for a cdsi credential
  • Optional: use the token from the previous contact discovery request
  • do parseAndSortE164Strings
  • use the cdsi credential to make an request
  • parse the result and update the contacts storage

The logic is still implemented in Java for signal android
https://github.com/signalapp/Signal-Android/blob/63cca2de6668c11e20c4c506fd61513d42c49711/app/src/main/java/org/thoughtcrime/securesms/contacts/sync/ContactDiscoveryRefreshV2.kt#L131

https://github.com/signalapp/Signal-Android/blob/90695182f34a747058ca6bc3c86156fe51f24885/libsignal/service/src/main/java/org/whispersystems/signalservice/api/SignalServiceAccountManager.java#L487

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

No branches or pull requests

2 participants