about summary refs log tree commit diff stats
path: root/src/command/cmd_funcs.c
diff options
context:
space:
mode:
authorPaul Fariello <paul@fariello.eu>2019-02-22 19:56:26 +0140
committerPaul Fariello <paul@fariello.eu>2019-04-10 16:03:50 +0200
commit79bb5016c22ee663f94b508feb59cb1d302b00b0 (patch)
treedee4257b101a615c04fa4cd573771d32cc1119ff /src/command/cmd_funcs.c
parentd8d7a5348c4f444f4452ebaa42a103b63dfc739d (diff)
downloadprofani-tty-79bb5016c22ee663f94b508feb59cb1d302b00b0.tar.gz
Ensure not to generate omemo crypto twice
Diffstat (limited to 'src/command/cmd_funcs.c')
-rw-r--r--src/command/cmd_funcs.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c
index ab5243c1..ab438c7f 100644
--- a/src/command/cmd_funcs.c
+++ b/src/command/cmd_funcs.c
@@ -7887,7 +7887,12 @@ cmd_omemo_gen(ProfWin *window, const char *const command, gchar **args)
 {
 #ifdef HAVE_OMEMO
     if (connection_get_status() != JABBER_CONNECTED) {
-        cons_show("You must be connected with an account to initialize OMEMO");
+        cons_show("You must be connected with an account to initialize OMEMO.");
+        return TRUE;
+    }
+
+    if (omemo_loaded()) {
+        cons_show("OMEMO crytographic materials have already been generated.");
         return TRUE;
     }