diff options
author | Michael Cortez | 2009-09-16 15:39:52 -0700 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2009-09-18 20:53:58 +0100 |
commit | 3b511d51388fa355c5ba4889cb7bc74c9c554b89 (patch) | |
tree | 0f445fee0e8f04c68fec6f4f9540f00a813c77a6 | |
parent | Add additional instrumentation so that when there is an xmlrpc call failure, ... (diff) | |
download | opensim-SC_OLD-3b511d51388fa355c5ba4889cb7bc74c9c554b89.zip opensim-SC_OLD-3b511d51388fa355c5ba4889cb7bc74c9c554b89.tar.gz opensim-SC_OLD-3b511d51388fa355c5ba4889cb7bc74c9c554b89.tar.bz2 opensim-SC_OLD-3b511d51388fa355c5ba4889cb7bc74c9c554b89.tar.xz |
Try to filter the groups list returns for User A, when sending to User B, based on User A's preferences for ShowInProfile.
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index 36adfad..79d7477 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | |||
@@ -1277,10 +1277,23 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1277 | // to the core Groups Stub | 1277 | // to the core Groups Stub |
1278 | remoteClient.SendGroupMembership(new GroupMembershipData[0]); | 1278 | remoteClient.SendGroupMembership(new GroupMembershipData[0]); |
1279 | 1279 | ||
1280 | GroupMembershipData[] membershipData = m_groupData.GetAgentGroupMemberships(GetClientGroupRequestID(remoteClient), dataForAgentID).ToArray(); | 1280 | List<GroupMembershipData> membershipData = m_groupData.GetAgentGroupMemberships(GetClientGroupRequestID(remoteClient), dataForAgentID); |
1281 | GroupMembershipData[] membershipArray; | ||
1281 | 1282 | ||
1282 | SendGroupMembershipInfoViaCaps(remoteClient, dataForAgentID, membershipData); | 1283 | if (remoteClient.AgentId != dataForAgentID) |
1283 | remoteClient.SendAvatarGroupsReply(dataForAgentID, membershipData); | 1284 | { |
1285 | Predicate<GroupMembershipData> showInProfile = delegate(GroupMembershipData membership) | ||
1286 | { | ||
1287 | return membership.ListInProfile; | ||
1288 | }; | ||
1289 | |||
1290 | membershipArray = membershipData.FindAll(showInProfile).ToArray(); | ||
1291 | } else { | ||
1292 | membershipArray = membershipData.ToArray(); | ||
1293 | } | ||
1294 | |||
1295 | SendGroupMembershipInfoViaCaps(remoteClient, dataForAgentID, membershipArray); | ||
1296 | remoteClient.SendAvatarGroupsReply(dataForAgentID, membershipArray); | ||
1284 | 1297 | ||
1285 | } | 1298 | } |
1286 | 1299 | ||