diff options
author | Michael Vetter <jubalh@iodoru.org> | 2019-04-17 13:58:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-17 13:58:45 +0200 |
commit | 9574127177a8e975add3cef523e85f6e75fe4585 (patch) | |
tree | af39effa0862736ebe548ae573d34d9aaef65983 /src/command/cmd_funcs.c | |
parent | 2eaec58c411f750b7dc8fd18a8608366c4652400 (diff) | |
parent | 8c71a74afe7c9fce8e51c17344396ab99676963a (diff) | |
download | profani-tty-9574127177a8e975add3cef523e85f6e75fe4585.tar.gz |
Merge pull request #1066 from paulfariello/hotfix/OMEMO-ensure-muc-is-nonanonymous
Ensure MUC is Non-Anonymous before starting OMEMO
Diffstat (limited to 'src/command/cmd_funcs.c')
-rw-r--r-- | src/command/cmd_funcs.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index a212fc86..3bba5cb5 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -8032,14 +8032,14 @@ cmd_omemo_start(ProfWin *window, const char *const command, gchar **args) ProfMucWin *mucwin = (ProfMucWin*)window; assert(mucwin->memcheck == PROFMUCWIN_MEMCHECK); - /* TODO: Check room is configured correctly, no anonymous and access to - * full jid */ - omemo_start_muc_sessions(mucwin->roomjid); - - mucwin->is_omemo = TRUE; + if (muc_anonymity_type(mucwin->roomjid) == MUC_ANONYMITY_TYPE_NONANONYMOUS) { + omemo_start_muc_sessions(mucwin->roomjid); + mucwin->is_omemo = TRUE; + } else { + win_println(window, THEME_DEFAULT, '!', "MUC must be non-anonymous (i.e. be configured to present real jid to anyone) in order to support OMEMO."); + } } else { win_println(window, THEME_DEFAULT, '-', "You must be in a regular chat window to start an OMEMO session."); - return TRUE; } } |