From 045c26f6265ff4e66f07280da555e10a0dc9e2fa Mon Sep 17 00:00:00 2001 From: Donnie Roberts Date: Wed, 5 Jun 2013 19:55:18 -0400 Subject: In LocalFriendshipTerminated, send the original client's agentId to the friend being removed instead of the friend's own id. --- OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | 6 +++--- OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/CoreModules/Avatar') diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index 4613344..41ea2a2 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs @@ -685,7 +685,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends // // Try local - if (LocalFriendshipTerminated(exfriendID)) + if (LocalFriendshipTerminated(client.AgentId, exfriendID)) return; PresenceInfo[] friendSessions = PresenceService.GetAgents(new string[] { exfriendID.ToString() }); @@ -827,13 +827,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends return false; } - public bool LocalFriendshipTerminated(UUID exfriendID) + public bool LocalFriendshipTerminated(UUID userID, UUID exfriendID) { IClientAPI friendClient = LocateClientObject(exfriendID); if (friendClient != null) { // the friend in this sim as root agent - friendClient.SendTerminateFriend(exfriendID); + friendClient.SendTerminateFriend(userID); // update local cache RecacheFriends(friendClient); // we're done diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs index 637beef..08196f1 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs @@ -193,7 +193,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends if (!UUID.TryParse(request["ToID"].ToString(), out toID)) return FailureResult(); - if (m_FriendsModule.LocalFriendshipTerminated(toID)) + if (m_FriendsModule.LocalFriendshipTerminated(fromID, toID)) return SuccessResult(); return FailureResult(); -- cgit v1.1