-
-
Notifications
You must be signed in to change notification settings - Fork 116
docs: set_config_from_qr() configures context for "DCACCOUNT:" and "DCLOGIN:" QRs (#7450) #7613
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
base: main
Are you sure you want to change the base?
Conversation
| "setqr" => { | ||
| ensure!(!arg1.is_empty(), "Argument <qr-content> missing."); | ||
| match set_config_from_qr(&context, arg1).await { | ||
| Ok(()) => println!("Config set from QR code, you can now call 'configure'"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is actually a program output, but rather a log, so decided to move it to stderr
deltachat-ffi/deltachat.h
Outdated
| * | ||
| * Internally, the function will call dc_set_config() with the appropriate keys, | ||
| * e.g. `addr` and `mail_pw` for DC_QR_ACCOUNT and DC_QR_LOGIN. | ||
| * DC_QR_ACCOUNT and DC_QR_LOGIN QR codes configure the context. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from reading this the change is not clear to me, I think these additions to the docs should also explain relation to add_transport_from_qr api. (not specific to cffi, maybe more a jsonrpc/rust api question, cffi doesn't seem to contain that new api)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from reading this the change is not clear to me
There's no change, it's a (almost) pure doc PR, but i meant that DC_QR_ACCOUNT and DC_QR_LOGIN QR codes configure the context if it wasn't configured before. Feel free to rephrase.
As for add_transport_from_qr(), it's indeed only in JSON-RPC and in case of the mentioned QR codes it has the same effect as set_config_from_qr(), so it makes sense to add a cross-reference between them. And IIUC both functions are valid and not deprecated for the mentioned QR codes.
EDIT: The difference is that set_config_from_qr() doesn't restart IO, it fails instead if IO is started.
…CLOGIN:" QRs (#7450) Also remove "you can now call 'configure'" from the REPL output, probably users of the REPL tool can read the code documentation to know when 'configure' should be run.
1a79c20 to
061b275
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is an improvement already, even though I'm still a little confused when reading it (but maybe that's just me).
Also remove "you can now call 'configure'" from the REPL output, probably users of the REPL tool can read the code documentation to know when 'configure' should be run.
Close #7450