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

let dc_check_qr and dc_join_securejoin accept invite-links #5217

Closed
r10s opened this issue Jan 28, 2024 · 1 comment · Fixed by #5219
Closed

let dc_check_qr and dc_join_securejoin accept invite-links #5217

r10s opened this issue Jan 28, 2024 · 1 comment · Fixed by #5219
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@r10s
Copy link
Member

r10s commented Jan 28, 2024

1.44 aims to focus more on invite-links (see https://i.delta.chat and https://github.com/deltachat/invite), meaning that eg. copy+paste will use invite links and not plain (otherwise mostly useless) OPENPGP4FPR-links.

as pasting links uses the same flow as scanning a qr code (so, dc_check_qr followed by dc_join_securejoin), both functions should additionally accept invite-links and handle them as OPENPGP4FPR-links

technically, they are mostly the same, to turn an invite-link to an OPENPGP4FPR-links:

  • replace prefix
  • replace the first & by #
  • leave everything else alone to allow future parameter changes (also groups already have more)
  • from UI perspective, nothing must change, just DC_QR_ASK_VERIFYCONTACT or DC_QR_ASK_VERIFYGROUP is returned

note, that existing OPENPGP4FPR-links are not replaced; they are still used as is in QR codes.

example:

https://i.delta.chat/#FINGERPRINT&a=ADDR&n=NAME&i=INVITENUMBER&s=AUTH
OPENPGP4FPR:FINGERPRINT#a=ADDR&n=NAME&i=INVITENUMBER&s=AUTH
@r10s r10s added good first issue Good for newcomers enhancement New feature or request labels Jan 28, 2024
@iequidoo iequidoo self-assigned this Jan 28, 2024
@r10s
Copy link
Member Author

r10s commented Jan 28, 2024

@iequidoo great you pick that up! ❤️ so i can concentrate on other things.

i just had a closer look at the code, seems it's mostly about calling decode_openpgp() also on the prefix https://i.delta.chat in check_qr() - everything else seems to be routed correctly then.

when adapting decode_openpgp(), let's also be tolerant for the first slash, so https://i.delta.chat/#FINGERPRINT&a=ADDR&... and https://i.delta.chat#FINGERPRINT&a=ADDR&... both work (regarding #1969, these things are a bit unsharp in practise :)

iequidoo added a commit that referenced this issue Jan 28, 2024
Accepts invite links with `https://i.delta.chat[/]#FINGERPRINT&a=ADDR[&OPTIONAL_PARAMS]`
scheme. Only `i.delta.chat` domain is supported now not to intersect with the common HTTPS scheme.
iequidoo added a commit that referenced this issue Jan 28, 2024
Accepts invite links with `https://i.delta.chat[/]#FINGERPRINT&a=ADDR[&OPTIONAL_PARAMS]`
scheme. Only `i.delta.chat` domain is supported now not to intersect with the common HTTPS scheme.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants