From 698b2135eed747c24e3325cc7e5a7bae513a2c25 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 28 Jul 2013 15:59:24 -0700 Subject: Fix an issue where HG members of groups weren't seeing the entire membership for group chat. --- OpenSim/Addons/Groups/GroupsMessagingModule.cs | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'OpenSim/Addons/Groups') diff --git a/OpenSim/Addons/Groups/GroupsMessagingModule.cs b/OpenSim/Addons/Groups/GroupsMessagingModule.cs index ce4f597..3cece77 100644 --- a/OpenSim/Addons/Groups/GroupsMessagingModule.cs +++ b/OpenSim/Addons/Groups/GroupsMessagingModule.cs @@ -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(); + + // 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 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 groupMembers = m_groupData.GetGroupMembers(requestingAgent, GroupID); List alreadySeen = new List(); + 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 => -- cgit v1.1