OPENPGP PLUGIN: Don't list expired/revoked GPG keys
Hello, @fiaxh This PR should close #91.
Other features includes :
-
Blocks sending a PGP message when your key is revoked or expired:
-
Coloring and adding a label signaling if your already selected key is either revoked or expired:
Kind regards, lili
Update: I did find a way. I'll need to modify the encryption_activated method in encryption_list_entry.vala. Working on it.
Edit: bingo!
Edit 2: I splitted the message, so if it's revoked:
or expired:
It still doesn't trigger if the key expires or revokes while dino is in use, but switching the encryption methods back and forth to GPG do rerun the check for expiry / revocation status and block the field accordingly.
Edit 3: It does trigger by switching back and forth conversations, or clicking the conversation in the left pane.
I did add a warning in the account panel if the current selected key has expired or is revoked:
It still doesn't trigger if the key expires or revokes while dino is in use
I finally managed to do that without needing to click on left pane or switching back and forth conversations.
It involves calling method on_encryption_activated in send_text() method in main/src/ui/chat_input/chat_input_controller.vala if PGP is the encryption method, triggering the checks in the plugin.
Now, if you try to send a message but the key has expired or has been revoked while Dino is in use and you're in a chat, the input should be blocked with the following depending on your situation:
With this, I think all bases are covered.
@NicoHood @cjj20 Feel free to test and give feedback anytime
@fiaxh Adapted for new UI:
Edit: added some coloring