1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Handle MAM when chatwin gets created from incoming message

This commit is contained in:
MarcoPolo-PasTonMolo 2022-07-10 12:28:14 +03:00
parent a2f79a19b9
commit 72f613a014
2 changed files with 10 additions and 1 deletions

View File

@ -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)) {

View File

@ -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);