mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 12:25:42 +08:00
Fixed permissions bug related to friends in PermissionsModule. Added FriendsData[] GetFriends(string principalID) to IFriendsData and FriendInfo[] GetFriends(string PrincipalID) to IFriendsService. Refactored some more in the FriendsModule. Made client get notification of local friends permissions upon HGLogin. HG Friends object permissions work.
This commit is contained in:
@@ -77,6 +77,11 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||
#region IFriendsService
|
||||
|
||||
public FriendInfo[] GetFriends(UUID principalID)
|
||||
{
|
||||
return GetFriends(principalID.ToString());
|
||||
}
|
||||
|
||||
public FriendInfo[] GetFriends(string principalID)
|
||||
{
|
||||
if (String.IsNullOrEmpty(m_serverUrl))
|
||||
return new FriendInfo[0];
|
||||
@@ -95,7 +100,14 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||
UUID friendID = friendEntry["Key"].AsUUID();
|
||||
|
||||
FriendInfo friend = new FriendInfo();
|
||||
friend.PrincipalID = principalID;
|
||||
if (!UUID.TryParse(principalID, out friend.PrincipalID))
|
||||
{
|
||||
string tmp = string.Empty;
|
||||
if (!Util.ParseUniversalUserIdentifier(principalID, out friend.PrincipalID, out tmp, out tmp, out tmp))
|
||||
// bad record. ignore this entry
|
||||
continue;
|
||||
}
|
||||
|
||||
friend.Friend = friendID.ToString();
|
||||
friend.MyFlags = friendEntry["Value"].AsInteger();
|
||||
friend.TheirFlags = -1;
|
||||
@@ -174,7 +186,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||
|
||||
#endregion IFriendsService
|
||||
|
||||
private OSDArray GetFriended(UUID ownerID)
|
||||
private OSDArray GetFriended(string ownerID)
|
||||
{
|
||||
NameValueCollection requestArgs = new NameValueCollection
|
||||
{
|
||||
@@ -195,7 +207,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||
}
|
||||
}
|
||||
|
||||
private OSDArray GetFriendedBy(UUID ownerID)
|
||||
private OSDArray GetFriendedBy(string ownerID)
|
||||
{
|
||||
NameValueCollection requestArgs = new NameValueCollection
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user