mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Avoid opening win if crypto materials are missing
This commit is contained in:
parent
89ece4f235
commit
5d90199a41
@ -7915,6 +7915,11 @@ cmd_omemo_start(ProfWin *window, const char *const command, gchar **args)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (!omemo_loaded()) {
|
||||
win_println(window, THEME_DEFAULT, '!', "You have not generated or loaded a cryptographic materials, use '/omemo gen'");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// recipient supplied
|
||||
if (args[1]) {
|
||||
char *contact = args[1];
|
||||
@ -7944,11 +7949,6 @@ cmd_omemo_start(ProfWin *window, const char *const command, gchar **args)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (!omemo_loaded()) {
|
||||
win_println(window, THEME_DEFAULT, '!', "You have not generated or loaded a cryptographic materials, use '/omemo gen'");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
omemo_start_session(barejid);
|
||||
chatwin->is_omemo = TRUE;
|
||||
} else {
|
||||
@ -7974,11 +7974,6 @@ cmd_omemo_start(ProfWin *window, const char *const command, gchar **args)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (!omemo_loaded()) {
|
||||
win_println(window, THEME_DEFAULT, '!', "You have not generated or loaded a cryptographic materials, use '/omemo gen'");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
omemo_start_session(chatwin->barejid);
|
||||
chatwin->is_omemo = TRUE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user