-
-
Notifications
You must be signed in to change notification settings - Fork 185
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
Extend /pgp
command to make key exchange procedure easier
#1850
Conversation
/pgp
command to make key exchange procedure easier
6eca994
to
ae77bb5
Compare
Hi! Didn't have time to review yet, only skimmed it. But I would suggest (for the future if you don't want to do it for this PR) to split the commits. The reason is that it makes it easier to revert commits. Let's say for some (imagined) reason we would like to remove the pgp exchange procedure. Then we could just do So it's good practise to have such things in individual commits. Even when it's unlikely that a revert will happen :) |
@sjaeckel ping |
81f64f5
to
6ee9142
Compare
6ee9142
to
8ae2963
Compare
@sjaeckel I'm uncertain if you plan to review again :) |
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 like the refactor of _cmd_set_boolean_preference()
👍
Would it maybe make sense to have a /pgp import
command which lets you select one of the last messages in a private chat and then tries to import that? ... in case a user doesn't want to auto-import all public keys. But that'd be for another PR I guess.
19b0e37
to
507936a
Compare
@jubalh review suggestions are applied. After almost 2 month in waiting, maybe it's time to merge? |
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.
Thanks for your patience!
So far I only looked at the code but now realize there could be a change in the commit messages as well.
In the first commit (Add /pgp sendpub command ) I'm missing a description what the command will do/why it is useful. And also with which other clients it is compatible (if it applies and you are aware of this info. I think you said it works with PSI).
Same for Add optional pgp public key autoimport
.
I think it deserves a short description of what it will do/why its wanted.
After this I think good to go. Sorry again for the long waiting time!
507936a
to
eeb0e57
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.
Sorry for the next bunch of change requests, but this PR is so huge, it's not easy to review. Also there are two sets of independent changes in there, which makes it even harder. That's really where the PR focused review approach falls short. If this were a commit based review approach it'd be cleaner, but it is as it is and therefore 🤷
Still I suggest to rebase on top of master and re-order the commits. Put "Refactor _cmd_set_boolean_preference
function" as the first commit and create a separate branch & PR for that single commit, which can then be quickly merged, so the "real changes" of this feature become visible.
@@ -381,6 +375,7 @@ p_gpg_list_keys(void) | |||
|
|||
gpgme_release(ctx); | |||
|
|||
// TODO: move autocomplete in other place |
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.
Why? Where?
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 might be considered unintended functionality, the function is a bit too bloated. It's more a design question and I left it for anyone who want to clean up the code even more in the future.
If you open a separate PR for those unrelated changes, maybe also include Cleanup char* to auto_gchar gchar* for prefs_get_string and Fix memory leak and cleanup of #1857 |
150bb8d
to
a0e0bde
Compare
Command allows to share your PGP pub key with ease, it's not described in XEP-0027, but used in some clients, such as PSI, Pidgin. Fix typos Minor improvements
Improve documentation Update code formatting and indentation for better readability Show state if no argument provided Show if argument wasn't changed Reduce amount of arguments
Refactor `p_gpg_list_keys` Add `/pgp autoimport` command, it's not described in XEP-0027, but used in some clients, such as PSI, Pidgin. It will autoimport keys received with `/pgp sendpub`, in plain text as a message, or using features, provided in other clients. It doesn't autoassign them, but shows command to assign, letting user to decide. Improve documentation for some preexisting functions Add contact argument to `/pgp sendpub`
Use `_cmd_ac_complete_params` when fits, thus reducing plurality
a0e0bde
to
7d6cbfd
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.
That's great descriptive commit messages now! Thanks :)
Thanks for your contribution! |
Thank you for reviews |
See commit messages