MUC service discovery cannot handle items with non-room JIDs

Issue #106 closed
Marc Philipp created an issue

ejabberd returns IQ responses like the following when there is a large number of rooms:

<iq from='conf.capulet.lit' to='juliet@capulet.lit/balcony' id='some-id' type='result'>
    <query xmlns='http://jabber.org/protocol/disco#items'>
        <item jid='conference.localhost' node='emptyrooms' name='Empty Rooms' />
        <item jid='chamber@conf.capulet.lit' name='Some room (private, 1)' />
    </query>
</iq>

MultiUserChatManager passed every JID to a ChatRoom constructor which throws an exception for JIDs that do not contain a local part. Would it be possible to filter JIDs in MultiUserChatManager.discoverRooms before creating ChatRooms out of them?

Comments (5)

  1. Christian Schudt repo owner

    Sure we can. I also wonder, if it's a appropriate to create ChatRoom s immediately.

  2. Christian Schudt repo owner

    MUC service discovery should handle items with non-room JIDs

    Fixes issue #106

    Also remove the initialize method, since it causes memory leaks.

    → <<cset d9e8b027a997>>

  3. Log in to comment