Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
mchhetri #1
Member since Feb 2008 · 6 posts · Location: Melbourne, Australia
Group memberships: Members
Show profile · Link to this post
Subject: How to check if a muc-room exists
Hi,

I'm building an application where users receive muc room info and then can join the room if they want to.

Before trying to join the room using the methods provided by the MucManager, I would like to see if the room actually exists.

The reason why I want to do this is because, currently, if the user tries to join the room and it doesn't exist, a new room is created. I'm using the Openfire server.

This is the incorrect behaviour. What I want to do is allow users to join the room if it exists, if not, then their invitation is no longer valid.

I have used the MucManager for managing all actions such as joining, leaving, destroying and creating rooms. However I could not find a method to check to see if a room exists.

Could anyone give me pointers in this regard?

Cheers,
Mohan
Avatar
mchhetri #2
Member since Feb 2008 · 6 posts · Location: Melbourne, Australia
Group memberships: Members
Show profile · Link to this post
Upon further examination of the api, I have found the DiscoManager which can be used to retrieve information about a muc-room.

If the muc-room does not exist, then an ItemNotFound information is returned.

Cheers,
Mohan
Avatar
Alex #3
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
this is correct
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS