tolgatanriverdi tolgatanriverdi - 1 year ago 81
Objective-C Question

Get MUC Room list which a user already participated

I'm using IOS XMPPFramework as our client infrastructure and we are using ejabberd as our XMPP Server.
However when users deleted their application its impossible to retrieve the already registered rooms.
Is something like that possible in XMPP (similar to whatsapp)


Answer Source
  1. Configure the room as Persistent, Member-Only.
  2. Add the user into member list.
  3. Discover room.

    xmppStream = XMPPStream()        
    xmppStream!.addDelegate(self, delegateQueue: DispatchQueue.main)
    // MUC
    muc = XMPPMUC(dispatchQueue: DispatchQueue.main)
    muc?.addDelegate(self, delegateQueue: DispatchQueue.main)
    muc?.discoverRooms(forServiceNamed: XmppMUCServer)