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 #2654

jryans opened this issue Aug 15, 2019 · 1 comment


Copy link

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

This comment has been minimized.

Copy link
Member Author

commented Sep 18, 2019

This concern here is resolved by fixing #2713.

@jryans jryans closed this Sep 18, 2019
@jryans jryans added phase:1 and removed phase:2 labels Sep 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.