mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-18 18:56:21 +00:00
Handle MAM when chatwin gets created from incoming message
This commit is contained in:
@@ -54,6 +54,7 @@
|
||||
#include "event/common.h"
|
||||
#include "plugins/plugins.h"
|
||||
#include "ui/window_list.h"
|
||||
#include "ui/window.h"
|
||||
#include "tools/bookmark_ignore.h"
|
||||
#include "xmpp/xmpp.h"
|
||||
#include "xmpp/muc.h"
|
||||
@@ -638,6 +639,11 @@ sv_ev_incoming_message(ProfMessage* message)
|
||||
chatwin = (ProfChatWin*)window;
|
||||
new_win = TRUE;
|
||||
|
||||
if (prefs_get_boolean(PREF_MAM)) {
|
||||
iq_mam_request(chatwin);
|
||||
win_print_loading_history(window);
|
||||
}
|
||||
|
||||
#ifdef HAVE_OMEMO
|
||||
if (!message->is_mam) {
|
||||
if (omemo_automatic_start(message->from_jid->barejid)) {
|
||||
|
||||
@@ -320,7 +320,10 @@ chatwin_incoming_msg(ProfChatWin* chatwin, ProfMessage* message, gboolean win_cr
|
||||
}
|
||||
|
||||
win_insert_last_read_position_marker((ProfWin*)chatwin, chatwin->barejid);
|
||||
win_print_incoming(window, display_name, message);
|
||||
|
||||
if (!win_created || !prefs_get_boolean(PREF_MAM)) {
|
||||
win_print_incoming(window, display_name, message);
|
||||
}
|
||||
}
|
||||
|
||||
wins_add_urls_ac(window, message);
|
||||
|
||||
Reference in New Issue
Block a user