mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 02:36:00 +08:00
Add test for adding a friend whilst online
This commit is contained in:
@@ -576,9 +576,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||
|
||||
private void OnApproveFriendRequest(IClientAPI client, UUID agentID, UUID friendID, List<UUID> callingCardFolders)
|
||||
{
|
||||
m_log.DebugFormat("[FRIENDS]: {0} accepted friendship from {1}", agentID, friendID);
|
||||
m_log.DebugFormat("[FRIENDS]: {0} accepted friendship from {1}", client.AgentId, friendID);
|
||||
|
||||
StoreFriendships(agentID, friendID);
|
||||
AddFriend(client, friendID);
|
||||
}
|
||||
|
||||
public void AddFriend(IClientAPI client, UUID friendID)
|
||||
{
|
||||
StoreFriendships(client.AgentId, friendID);
|
||||
|
||||
// Update the local cache
|
||||
RefetchFriends(client);
|
||||
@@ -588,7 +593,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||
//
|
||||
|
||||
// Try Local
|
||||
if (LocalFriendshipApproved(agentID, client.Name, friendID))
|
||||
if (LocalFriendshipApproved(client.AgentId, client.Name, friendID))
|
||||
{
|
||||
client.SendAgentOnline(new UUID[] { friendID });
|
||||
return;
|
||||
@@ -602,7 +607,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||
if (friendSession != null)
|
||||
{
|
||||
GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.RegionID);
|
||||
m_FriendsSimConnector.FriendshipApproved(region, agentID, client.Name, friendID);
|
||||
m_FriendsSimConnector.FriendshipApproved(region, client.AgentId, client.Name, friendID);
|
||||
client.SendAgentOnline(new UUID[] { friendID });
|
||||
}
|
||||
}
|
||||
@@ -869,7 +874,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update loca cache only
|
||||
/// Update local cache only
|
||||
/// </summary>
|
||||
/// <param name="userID"></param>
|
||||
/// <param name="friendID"></param>
|
||||
|
||||
Reference in New Issue
Block a user