diff options
author | Paul Fariello <paul@fariello.eu> | 2019-02-22 19:56:26 +0140 |
---|---|---|
committer | Paul Fariello <paul@fariello.eu> | 2019-04-10 16:03:50 +0200 |
commit | 79bb5016c22ee663f94b508feb59cb1d302b00b0 (patch) | |
tree | dee4257b101a615c04fa4cd573771d32cc1119ff | |
parent | d8d7a5348c4f444f4452ebaa42a103b63dfc739d (diff) | |
download | profani-tty-79bb5016c22ee663f94b508feb59cb1d302b00b0.tar.gz |
Ensure not to generate omemo crypto twice
-rw-r--r-- | src/command/cmd_funcs.c | 7 |
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; } |