Merge MAM improvements from #1724

I think this PR already solves and improves the MAM situation a lot.

What's @MarcoPolo-PasTonMolo still wanted to do in this branch is:
* MAM for mucs
* Check if url and quotes autocompletion works fine
* Check if the api still works fine
* Resolve conflicts

Conflicts are solved with this commit.

MAM for mucs can be another feature PR.

The rest we can check while being on master. And more people can help
testing.
This commit is contained in:
Michael Vetter
2022-10-21 13:24:46 +02:00
13 changed files with 495 additions and 64 deletions

View File

@@ -55,6 +55,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"
@@ -648,6 +649,11 @@ sv_ev_incoming_message(ProfMessage* message)
chatwin = (ProfChatWin*)window;
new_win = TRUE;
if (prefs_get_boolean(PREF_MAM)) {
win_print_loading_history(window);
iq_mam_request(chatwin, g_date_time_add_seconds(message->timestamp, 0)); // copy timestamp
}
#ifdef HAVE_OMEMO
if (!message->is_mam) {
if (omemo_automatic_start(message->from_jid->barejid)) {