about summary refs log tree commit diff stats
path: root/src/command
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-06-29 15:14:55 +0200
committerMichael Vetter <jubalh@iodoru.org>2020-06-29 15:14:55 +0200
commit2f4b1734e945b27d54da1cf7cdd0226bd06f07d9 (patch)
treef2146a05a10db8dde5d6d5a1818fee3dd0814eb2 /src/command
parent6bb00da517a3373cec256019073996097d1a3d97 (diff)
downloadprofani-tty-2f4b1734e945b27d54da1cf7cdd0226bd06f07d9.tar.gz
Dont allow starting a PGP session while in an OMEMO session
Diffstat (limited to 'src/command')
-rw-r--r--src/command/cmd_funcs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c
index d184e56e..6213ba88 100644
--- a/src/command/cmd_funcs.c
+++ b/src/command/cmd_funcs.c
@@ -7355,6 +7355,11 @@ cmd_pgp(ProfWin *window, const char *const command, gchar **args)
             return TRUE;
         }
 
+        if (chatwin->is_omemo) {
+            win_println(window, THEME_DEFAULT, "!", "You must disable OMEMO before starting an PGP encrypted session.");
+            return TRUE;
+        }
+
         ProfAccount *account = accounts_get_account(session_get_account_name());
         char *err_str = NULL;
         if (!p_gpg_valid_key(account->pgp_keyid, &err_str)) {