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:
parent
a2f79a19b9
commit
72f613a014
@ -54,6 +54,7 @@
|
|||||||
#include "event/common.h"
|
#include "event/common.h"
|
||||||
#include "plugins/plugins.h"
|
#include "plugins/plugins.h"
|
||||||
#include "ui/window_list.h"
|
#include "ui/window_list.h"
|
||||||
|
#include "ui/window.h"
|
||||||
#include "tools/bookmark_ignore.h"
|
#include "tools/bookmark_ignore.h"
|
||||||
#include "xmpp/xmpp.h"
|
#include "xmpp/xmpp.h"
|
||||||
#include "xmpp/muc.h"
|
#include "xmpp/muc.h"
|
||||||
@ -638,6 +639,11 @@ sv_ev_incoming_message(ProfMessage* message)
|
|||||||
chatwin = (ProfChatWin*)window;
|
chatwin = (ProfChatWin*)window;
|
||||||
new_win = TRUE;
|
new_win = TRUE;
|
||||||
|
|
||||||
|
if (prefs_get_boolean(PREF_MAM)) {
|
||||||
|
iq_mam_request(chatwin);
|
||||||
|
win_print_loading_history(window);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef HAVE_OMEMO
|
#ifdef HAVE_OMEMO
|
||||||
if (!message->is_mam) {
|
if (!message->is_mam) {
|
||||||
if (omemo_automatic_start(message->from_jid->barejid)) {
|
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_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);
|
wins_add_urls_ac(window, message);
|
||||||
|
Loading…
Reference in New Issue
Block a user