mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Handle window type MUC in OMEMO start command
This commit is contained in:
parent
a3897abba1
commit
21f247d0eb
@ -7952,11 +7952,7 @@ cmd_omemo_start(ProfWin *window, const char *const command, gchar **args)
|
|||||||
omemo_start_session(barejid);
|
omemo_start_session(barejid);
|
||||||
chatwin->is_omemo = TRUE;
|
chatwin->is_omemo = TRUE;
|
||||||
} else {
|
} else {
|
||||||
if (window->type != WIN_CHAT) {
|
if (window->type == WIN_CHAT) {
|
||||||
win_println(window, THEME_DEFAULT, '-', "You must be in a regular chat window to start an OMEMO session.");
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
ProfChatWin *chatwin = (ProfChatWin*)window;
|
ProfChatWin *chatwin = (ProfChatWin*)window;
|
||||||
assert(chatwin->memcheck == PROFCHATWIN_MEMCHECK);
|
assert(chatwin->memcheck == PROFCHATWIN_MEMCHECK);
|
||||||
if (chatwin->pgp_send) {
|
if (chatwin->pgp_send) {
|
||||||
@ -7976,6 +7972,12 @@ cmd_omemo_start(ProfWin *window, const char *const command, gchar **args)
|
|||||||
|
|
||||||
omemo_start_session(chatwin->barejid);
|
omemo_start_session(chatwin->barejid);
|
||||||
chatwin->is_omemo = TRUE;
|
chatwin->is_omemo = TRUE;
|
||||||
|
} else if (window->type == WIN_MUC) {
|
||||||
|
} else {
|
||||||
|
win_println(window, THEME_DEFAULT, '-', "You must be in a regular chat window to start an OMEMO session.");
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user