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. *