Try to filter the groups list returns for User A, when sending to User B, based on User A's preferences for ShowInProfile.

remotes/origin/0.6.7-post-fixes
Michael Cortez 2009-09-16 15:39:52 -07:00 committed by Justin Clark-Casey (justincc)
parent 247fdd1a4d
commit 3b511d5138
1 changed files with 16 additions and 3 deletions

View File

@ -1277,10 +1277,23 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
// to the core Groups Stub
remoteClient.SendGroupMembership(new GroupMembershipData[0]);
GroupMembershipData[] membershipData = m_groupData.GetAgentGroupMemberships(GetClientGroupRequestID(remoteClient), dataForAgentID).ToArray();
List<GroupMembershipData> membershipData = m_groupData.GetAgentGroupMemberships(GetClientGroupRequestID(remoteClient), dataForAgentID);
GroupMembershipData[] membershipArray;
SendGroupMembershipInfoViaCaps(remoteClient, dataForAgentID, membershipData);
remoteClient.SendAvatarGroupsReply(dataForAgentID, membershipData);
if (remoteClient.AgentId != dataForAgentID)
{
Predicate<GroupMembershipData> showInProfile = delegate(GroupMembershipData membership)
{
return membership.ListInProfile;
};
membershipArray = membershipData.FindAll(showInProfile).ToArray();
} else {
membershipArray = membershipData.ToArray();
}
SendGroupMembershipInfoViaCaps(remoteClient, dataForAgentID, membershipArray);
remoteClient.SendAvatarGroupsReply(dataForAgentID, membershipArray);
}