From beba20846f1935e2769f78fb0c87746cf77a6b50 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 12 Mar 2014 19:31:04 +0000 Subject: When sending group notices through group messaging, allow the agent ID to use for fetching group data to be different from im.fromAgentID This is because xmlrpcgroups currently always checks visibility for the requesting agent ID (unlike Groups v2, which can accept UUID.Zero) But group notice IMs have a from agent which is the group rather than the sending agent. Further addresses http://opensimulator.org/mantis/view.php?id=7037 --- OpenSim/Addons/Groups/GroupsMessagingModule.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'OpenSim/Addons') diff --git a/OpenSim/Addons/Groups/GroupsMessagingModule.cs b/OpenSim/Addons/Groups/GroupsMessagingModule.cs index f701e48..92528a2 100644 --- a/OpenSim/Addons/Groups/GroupsMessagingModule.cs +++ b/OpenSim/Addons/Groups/GroupsMessagingModule.cs @@ -83,7 +83,6 @@ namespace OpenSim.Groups private Dictionary> m_groupsAgentsDroppedFromChatSession = new Dictionary>(); private Dictionary> m_groupsAgentsInvitedToChatSession = new Dictionary>(); - #region Region Module interfaceBase Members public void Initialise(IConfigSource config) @@ -242,13 +241,18 @@ namespace OpenSim.Groups public void SendMessageToGroup(GridInstantMessage im, UUID groupID) { - SendMessageToGroup(im, groupID, null); + SendMessageToGroup(im, groupID, UUID.Zero, null); } - public void SendMessageToGroup(GridInstantMessage im, UUID groupID, Func sendCondition) + public void SendMessageToGroup( + GridInstantMessage im, UUID groupID, UUID sendingAgentForGroupCalls, Func sendCondition) { UUID fromAgentID = new UUID(im.fromAgentID); + + // Unlike current XmlRpcGroups, Groups V2 can accept UUID.Zero when a perms check for the requesting agent + // is not necessary. List groupMembers = m_groupData.GetGroupMembers(UUID.Zero.ToString(), groupID); + int groupMembersCount = groupMembers.Count; PresenceInfo[] onlineAgents = null; -- cgit v1.1