aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-03-12 19:31:04 +0000
committerJustin Clark-Casey (justincc)2014-03-12 19:31:04 +0000
commitbeba20846f1935e2769f78fb0c87746cf77a6b50 (patch)
treecea7c1bce6d3b3938d61620d15ae73cc7b535985 /OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups
parentEnable MapImageServiceModule with no refresh (diff)
downloadopensim-SC-beba20846f1935e2769f78fb0c87746cf77a6b50.zip
opensim-SC-beba20846f1935e2769f78fb0c87746cf77a6b50.tar.gz
opensim-SC-beba20846f1935e2769f78fb0c87746cf77a6b50.tar.bz2
opensim-SC-beba20846f1935e2769f78fb0c87746cf77a6b50.tar.xz
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
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs9
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs3
2 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
index 741a98f..fd804cd 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
@@ -238,15 +238,15 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
238 } 238 }
239 } 239 }
240 240
241
242 public void SendMessageToGroup(GridInstantMessage im, UUID groupID) 241 public void SendMessageToGroup(GridInstantMessage im, UUID groupID)
243 { 242 {
244 SendMessageToGroup(im, groupID, null); 243 SendMessageToGroup(im, groupID, new UUID(im.fromAgentID), null);
245 } 244 }
246 245
247 public void SendMessageToGroup(GridInstantMessage im, UUID groupID, Func<GroupMembersData, bool> sendCondition) 246 public void SendMessageToGroup(
247 GridInstantMessage im, UUID groupID, UUID sendingAgentForGroupCalls, Func<GroupMembersData, bool> sendCondition)
248 { 248 {
249 List<GroupMembersData> groupMembers = m_groupData.GetGroupMembers(new UUID(im.fromAgentID), groupID); 249 List<GroupMembersData> groupMembers = m_groupData.GetGroupMembers(sendingAgentForGroupCalls, groupID);
250 int groupMembersCount = groupMembers.Count; 250 int groupMembersCount = groupMembers.Count;
251 251
252 if (m_messageOnlineAgentsOnly) 252 if (m_messageOnlineAgentsOnly)
@@ -489,7 +489,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
489 489
490 #endregion 490 #endregion
491 491
492
493 #region ClientEvents 492 #region ClientEvents
494 private void OnInstantMessage(IClientAPI remoteClient, GridInstantMessage im) 493 private void OnInstantMessage(IClientAPI remoteClient, GridInstantMessage im)
495 { 494 {
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
index d4f70a7..fc8cae2 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
@@ -538,7 +538,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
538 = CreateGroupNoticeIM(UUID.Zero, NoticeID, (byte)OpenMetaverse.InstantMessageDialog.GroupNotice); 538 = CreateGroupNoticeIM(UUID.Zero, NoticeID, (byte)OpenMetaverse.InstantMessageDialog.GroupNotice);
539 539
540 if (m_groupsMessagingModule != null) 540 if (m_groupsMessagingModule != null)
541 m_groupsMessagingModule.SendMessageToGroup(msg, GroupID, gmd => gmd.AcceptNotices); 541 m_groupsMessagingModule.SendMessageToGroup(
542 msg, GroupID, remoteClient.AgentId, gmd => gmd.AcceptNotices);
542 } 543 }
543 } 544 }
544 545