From 79bb5016c22ee663f94b508feb59cb1d302b00b0 Mon Sep 17 00:00:00 2001 From: Paul Fariello Date: Fri, 22 Feb 2019 19:56:26 +0140 Subject: [PATCH] Ensure not to generate omemo crypto twice --- src/command/cmd_funcs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; }