File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 3434 */
3535
3636#include "config.h"
37+ #include "config/preferences.h"
3738
3839#ifdef HAVE_GIT_VERSION
3940#include "gitversion.h"
@@ -563,6 +564,15 @@ stanza_create_room_join_presence(xmpp_ctx_t* const ctx,
563564 xmpp_stanza_release (pass );
564565 }
565566
567+ // Disable muc history
568+ if (prefs_get_boolean (PREF_MAM )) {
569+ xmpp_stanza_t * history = xmpp_stanza_new (ctx );
570+ xmpp_stanza_set_name (history , STANZA_NAME_HISTORY );
571+ xmpp_stanza_set_attribute (history , "maxchars" , "0" );
572+ xmpp_stanza_add_child (x , history );
573+ xmpp_stanza_release (history );
574+ }
575+
566576 xmpp_stanza_add_child (presence , x );
567577 xmpp_stanza_release (x );
568578
Original file line number Diff line number Diff line change 5656#define STANZA_NAME_PRESENCE "presence"
5757#define STANZA_NAME_PRIORITY "priority"
5858#define STANZA_NAME_X "x"
59+ #define STANZA_NAME_HISTORY "history"
5960// XEP-0373: OpenPGP for XMPP
6061#define STANZA_NAME_OPENPGP "openpgp"
6162#define STANZA_NAME_PUPKEY "pubkey"
You can’t perform that action at this time.
0 commit comments