diff options
author | Michael Vetter <jubalh@iodoru.org> | 2020-02-12 14:06:00 +0100 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2020-02-14 10:17:07 +0100 |
commit | 4ec005e4c3563066e33e0cf7b87dd027489f03bc (patch) | |
tree | 2e5843c6e8941c3f0a2eb96c5364832598dcbcbb /src/command/cmd_funcs.c | |
parent | 2a7a389cb542abb8055a850ad80959e3cf855cae (diff) | |
download | profani-tty-4ec005e4c3563066e33e0cf7b87dd027489f03bc.tar.gz |
xep-0308: Implement LMC for outgoing MUC messages
Including OMEMO encrypted ones. Also rename `win_println_me_message()` to `win_print_outgoing_muc_msg() as I think it's a more descriptive name.
Diffstat (limited to 'src/command/cmd_funcs.c')
-rw-r--r-- | src/command/cmd_funcs.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index bd1b0a6c..cfb78cd4 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -8703,6 +8703,18 @@ cmd_correct(ProfWin *window, const char *const command, gchar **args) // send message again, with replace flag cl_ev_send_msg_correct(chatwin, args[0], FALSE, TRUE); return TRUE; + } else if (window->type == WIN_MUC) { + ProfMucWin *mucwin = (ProfMucWin*)window; + assert(mucwin->memcheck == PROFMUCWIN_MEMCHECK); + + if (mucwin->last_msg_id == NULL || mucwin->last_message == NULL) { + win_println(window, THEME_DEFAULT, '!', "No last message to correct."); + return TRUE; + } + + // send message again, with replace flag + cl_ev_send_muc_msg_corrected(mucwin, args[0], FALSE, TRUE); + return TRUE; } win_println(window, THEME_DEFAULT, '!', "Command /correct only valid in regular chat windows."); |