Commit 4b5d0b37 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Added #isGroupPublic(Group).


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@1240 b35dd754-fafc-0310-a699-88a17e54d16e
parent e05a32b6
...@@ -467,6 +467,21 @@ public class RosterManager extends BasicModule implements GroupEventListener { ...@@ -467,6 +467,21 @@ public class RosterManager extends BasicModule implements GroupEventListener {
return answer; return answer;
} }
/**
* Returns true if a given group is visible to any user. That means, if any user can
* see the group in his roster.
*
* @param group the group to check if the user can see.
* @return true if a given group is visible by any user.
*/
boolean isGroupPublic(Group group) {
String showInRoster = group.getProperties().get("sharedRoster.showInRoster");
if ("everybody".equals(showInRoster)) {
return true;
}
return false;
}
/** /**
* Returns true if a given group is visible to a given user. That means, if the user can * Returns true if a given group is visible to a given user. That means, if the user can
* see the group in his roster. * see the group in his roster.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment