File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -552,6 +552,11 @@ stanza_create_room_join_presence(xmpp_ctx_t* const ctx,
552552 xmpp_stanza_set_name (x , STANZA_NAME_X );
553553 xmpp_stanza_set_ns (x , STANZA_NS_MUC );
554554
555+ // Disable muc history
556+ xmpp_stanza_t * history = xmpp_stanza_new (ctx );
557+ xmpp_stanza_set_name (history , STANZA_NAME_HISTORY );
558+ xmpp_stanza_set_attribute (history , "maxchars" , "0" );
559+
555560 if (passwd ) {
556561 xmpp_stanza_t * pass = xmpp_stanza_new (ctx );
557562 xmpp_stanza_set_name (pass , "password" );
@@ -563,7 +568,9 @@ stanza_create_room_join_presence(xmpp_ctx_t* const ctx,
563568 xmpp_stanza_release (pass );
564569 }
565570
571+ xmpp_stanza_add_child (x , history );
566572 xmpp_stanza_add_child (presence , x );
573+ xmpp_stanza_release (history );
567574 xmpp_stanza_release (x );
568575
569576 return presence ;
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