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

Use nicer APIs for toggling a 3PID's shared status #10566

Closed
jryans opened this issue Aug 15, 2019 · 1 comment
Closed

Use nicer APIs for toggling a 3PID's shared status #10566

jryans opened this issue Aug 15, 2019 · 1 comment

Comments

@jryans
Copy link
Collaborator

jryans commented Aug 15, 2019

At the moment, when toggling a 3PID's shared status, Riot will:

  1. Remove the 3PID from the HS with POST /_matrix/client/r0/account/3pid/delete
  2. Re-add the 3PID via the HS with POST /_matrix/client/r0/account/3pid/[email|msisdn]/requestToken and setting the bind flag to the new status
  3. Usual 3PID validation and adding flow

This is not great in general, as it's not atomic, so if you never act on the validation token, then you have actually entirely removed the 3PID from your account.

Instead we should change to the new APIs tracked in matrix-org/synapse#5827 and matrix-org/synapse#5862.

To change a 3PID from unshared to shared:

  1. Call POST /_matrix/client/r0/account/3pid/[email|msisdn]/requestToken and setting the bind flag to the new status
  2. Usual 3PID validation and adding flow

To change a 3PID from shared to unshared:

  1. Call POST /_matrix/client/r0/account/3pid/unbind
@jryans
Copy link
Collaborator Author

jryans commented Sep 18, 2019

This concern here is resolved by fixing #10839.

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

No branches or pull requests

1 participant