HG IM in grid mode working fairly well. Unknown target user references looked back in source user's User Agent service.

This commit is contained in:
Diva Canto
2011-05-26 10:04:48 -07:00
parent 587b17e23b
commit 0c58a9e680
11 changed files with 264 additions and 17 deletions

View File

@@ -485,6 +485,30 @@ namespace OpenSim.Services.HypergridService
return string.Empty;
}
public string GetUUI(UUID userID, UUID targetUserID)
{
// Let's see if it's a local user
UserAccount account = m_UserAccountService.GetUserAccount(UUID.Zero, targetUserID);
if (account != null)
return targetUserID.ToString() + ";" + m_GridName + ";" + account.FirstName + " " + account.LastName ;
// Let's try the list of friends
FriendInfo[] friends = m_FriendsService.GetFriends(userID);
if (friends != null && friends.Length > 0)
{
foreach (FriendInfo f in friends)
if (f.Friend.StartsWith(targetUserID.ToString()))
{
// Let's remove the secret
UUID id; string tmp = string.Empty, secret = string.Empty;
if (Util.ParseUniversalUserIdentifier(f.Friend, out id, out tmp, out tmp, out tmp, out secret))
return f.Friend.Replace(secret, "0");
}
}
return string.Empty;
}
}
class TravelingAgentInfo