@@ -357,7 +357,7 @@ describe("A MUC", function () {
357357
358358 const connection = api . connection . get ( ) ;
359359 const sent_stanzas = connection . sent_stanzas ;
360- await u . waitUntil ( ( ) => sent_stanzas . filter ( iq => sizzle ( 'presence history' , iq ) . length ) . pop ( ) ) ;
360+ await u . waitUntil ( ( ) => sent_stanzas . filter ( s => s . nodeName === 'presence' && s . getAttribute ( 'to' ) . startsWith ( muc_jid ) ) . pop ( ) ) ;
361361
362362 const { IQ_stanzas } = api . connection . get ( ) ;
363363
@@ -381,15 +381,13 @@ describe("A MUC", function () {
381381
382382 await mock . waitForMUCDiscoInfo ( _converse , muc_jid ) ;
383383
384- let sent_stanza = await u . waitUntil ( ( ) => sent_stanzas . filter ( iq => sizzle ( 'presence history' , iq ) . length ) . pop ( ) ) ;
384+ let sent_stanza = await u . waitUntil ( ( ) => sent_stanzas . filter ( s => s . nodeName === 'presence' && s . getAttribute ( 'to' ) . startsWith ( muc_jid ) ) . pop ( ) ) ;
385385 expect ( sent_stanza ) . toEqualStanza ( stx `
386386 <presence id="${ sent_stanza . getAttribute ( 'id' ) } "
387387 from="${ connection . jid } "
388388 to="${ muc_jid } /romeo-2"
389389 xmlns="jabber:client">
390- <x xmlns="http://jabber.org/protocol/muc">
391- <history maxstanzas="0"/>
392- </x>
390+ <x xmlns="http://jabber.org/protocol/muc"/>
393391 <c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="https://conversejs.org"
394392 ver="qgxN8hmrdSa2/4/7PUoM9bPFN2s="/>
395393 </presence>` ) ;
@@ -413,15 +411,13 @@ describe("A MUC", function () {
413411
414412 await mock . waitForMUCDiscoInfo ( _converse , muc_jid ) ;
415413
416- sent_stanza = await u . waitUntil ( ( ) => sent_stanzas . filter ( iq => sizzle ( 'presence history' , iq ) . length ) . pop ( ) ) ;
414+ sent_stanza = await u . waitUntil ( ( ) => sent_stanzas . filter ( s => s . nodeName === 'presence' && s . getAttribute ( 'to' ) . startsWith ( muc_jid ) ) . pop ( ) ) ;
417415 expect ( sent_stanza ) . toEqualStanza ( stx `
418416 <presence id="${ sent_stanza . getAttribute ( 'id' ) } "
419417 from="${ connection . jid } "
420418 to="${ muc_jid } /romeo-3"
421419 xmlns="jabber:client">
422- <x xmlns="http://jabber.org/protocol/muc">
423- <history maxstanzas="0"/>
424- </x>
420+ <x xmlns="http://jabber.org/protocol/muc"/>
425421 <c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="https://conversejs.org"
426422 ver="qgxN8hmrdSa2/4/7PUoM9bPFN2s="/>
427423 </presence>` ) ;
@@ -445,15 +441,13 @@ describe("A MUC", function () {
445441
446442 await mock . waitForMUCDiscoInfo ( _converse , muc_jid ) ;
447443
448- sent_stanza = await u . waitUntil ( ( ) => sent_stanzas . filter ( iq => sizzle ( 'presence history' , iq ) . length ) . pop ( ) ) ;
444+ sent_stanza = await u . waitUntil ( ( ) => sent_stanzas . filter ( s => s . nodeName === 'presence' && s . getAttribute ( 'to' ) . startsWith ( muc_jid ) ) . pop ( ) ) ;
449445 expect ( sent_stanza ) . toEqualStanza ( stx `
450446 <presence id="${ sent_stanza . getAttribute ( 'id' ) } "
451447 from="${ connection . jid } "
452448 to="${ muc_jid } /romeo-4"
453449 xmlns="jabber:client">
454- <x xmlns="http://jabber.org/protocol/muc">
455- <history maxstanzas="0"/>
456- </x>
450+ <x xmlns="http://jabber.org/protocol/muc"/>
457451 <c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="https://conversejs.org"
458452 ver="qgxN8hmrdSa2/4/7PUoM9bPFN2s="/>
459453 </presence>` ) ;
0 commit comments