From 1dd65bca6bdf1f664a2f8cdb7f5514727f8b6bf6 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Sun, 2 Jun 2024 19:07:58 +0200 Subject: [PATCH] Check whether we are already in an omemo session for MUCs as well We do this for regular chatwins already. --- src/command/cmd_funcs.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index bb274c7e..68982a15 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -8682,6 +8682,11 @@ cmd_omemo_start(ProfWin* window, const char* const command, gchar** args) ProfMucWin* mucwin = (ProfMucWin*)window; assert(mucwin->memcheck == PROFMUCWIN_MEMCHECK); + if (mucwin->is_omemo) { + win_println((ProfWin*)mucwin, THEME_DEFAULT, "!", "You are already in an OMEMO session."); + return TRUE; + } + if (muc_anonymity_type(mucwin->roomjid) == MUC_ANONYMITY_TYPE_NONANONYMOUS && muc_member_type(mucwin->roomjid) == MUC_MEMBER_TYPE_MEMBERS_ONLY) { accounts_add_omemo_state(session_get_account_name(), mucwin->roomjid, TRUE);