Fix an issue where HG members of groups weren't seeing the entire membership for group chat.

TeleportWork
Diva Canto 2013-07-28 15:59:24 -07:00
parent 63f6c8f27c
commit 698b2135ee
1 changed files with 20 additions and 2 deletions

View File

@ -52,7 +52,7 @@ namespace OpenSim.Groups
private IPresenceService m_presenceService;
private IMessageTransferModule m_msgTransferModule = null;
private IUserManagement m_UserManagement = null;
private IGroupsServicesConnector m_groupData = null;
// Config Options
@ -162,6 +162,17 @@ namespace OpenSim.Groups
return;
}
m_UserManagement = scene.RequestModuleInterface<IUserManagement>();
// No groups module, no groups messaging
if (m_UserManagement == null)
{
m_log.Error("[Groups.Messaging]: Could not get IUserManagement, GroupsMessagingModule is now disabled.");
RemoveRegion(scene);
return;
}
if (m_presenceService == null)
m_presenceService = scene.PresenceService;
@ -392,9 +403,16 @@ namespace OpenSim.Groups
Scene aScene = m_sceneList[0];
GridRegion regionOfOrigin = aScene.GridService.GetRegionByUUID(aScene.RegionInfo.ScopeID, regionID);
List<GroupMembersData> groupMembers = m_groupData.GetGroupMembers(new UUID(msg.fromAgentID).ToString(), GroupID);
// Let's find out who sent it
string requestingAgent = m_UserManagement.GetUserUUI(new UUID(msg.fromAgentID));
List<GroupMembersData> groupMembers = m_groupData.GetGroupMembers(requestingAgent, GroupID);
List<UUID> alreadySeen = new List<UUID>();
if (m_debugEnabled)
foreach (GroupMembersData m in groupMembers)
m_log.DebugFormat("[Groups.Messaging]: member {0}", m.AgentID);
foreach (Scene s in m_sceneList)
{
s.ForEachScenePresence(sp =>