From 593fd54fc77bc712d89b8b95c2813491419fc6aa Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 27 Feb 2010 11:23:31 -0800 Subject: Update the local cache upon friendship acceptance. Logout notifications working. --- OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index 8f1b5d7..a750c92 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs @@ -419,6 +419,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends private void OnApproveFriendRequest(IClientAPI client, UUID agentID, UUID friendID, List callingCardFolders) { FriendsService.StoreFriend(agentID, friendID.ToString(), 1); + // update the local cache + m_Friends[agentID].Friends = FriendsService.GetFriends(agentID); m_log.DebugFormat("[FRIENDS]: {0} accepted friendship from {1}", agentID, friendID); @@ -434,6 +436,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends (byte)OpenMetaverse.InstantMessageDialog.FriendshipAccepted, client.AgentId.ToString(), false, Vector3.Zero); friendClient.SendInstantMessage(im); client.SendAgentOnline(new UUID[] { friendID }); + // update the local cache + m_Friends[friendID].Friends = FriendsService.GetFriends(friendID); // we're done return; } -- cgit v1.1