From bdd395b0dcaa3e5d26c0716367a32cf8efe38ed6 Mon Sep 17 00:00:00 2001 From: Gaston Dombiak Date: Fri, 27 May 2005 18:12:52 +0000 Subject: [PATCH] Added JID of the room whose information was discovered. SMACK-57 git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2493 b35dd754-fafc-0310-a699-88a17e54d16e --- source/org/jivesoftware/smackx/muc/RoomInfo.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/source/org/jivesoftware/smackx/muc/RoomInfo.java b/source/org/jivesoftware/smackx/muc/RoomInfo.java index ed227912e..694dd38d8 100644 --- a/source/org/jivesoftware/smackx/muc/RoomInfo.java +++ b/source/org/jivesoftware/smackx/muc/RoomInfo.java @@ -32,6 +32,10 @@ import org.jivesoftware.smackx.Form; */ public class RoomInfo { + /** + * JID of the room. The node of the JID is commonly used as the ID of the room or name. + */ + private String room; /** * Description of the room. */ @@ -72,6 +76,7 @@ public class RoomInfo { RoomInfo(DiscoverInfo info) { super(); + this.room = info.getFrom(); // Get the information based on the discovered features this.membersOnly = info.containsFeature("muc_membersonly"); this.moderated = info.containsFeature("muc_moderated"); @@ -90,6 +95,15 @@ public class RoomInfo { } } + /** + * Returns the JID of the room whose information was discovered. + * + * @return the JID of the room whose information was discovered. + */ + public String getRoom() { + return room; + } + /** * Returns the discovered description of the room. *