In LocalFriendshipTerminated, send the original client's agentId to the friend being removed instead of the friend's own id.
parent
25fa647a74
commit
045c26f626
|
@ -685,7 +685,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||||
//
|
//
|
||||||
|
|
||||||
// Try local
|
// Try local
|
||||||
if (LocalFriendshipTerminated(exfriendID))
|
if (LocalFriendshipTerminated(client.AgentId, exfriendID))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
PresenceInfo[] friendSessions = PresenceService.GetAgents(new string[] { exfriendID.ToString() });
|
PresenceInfo[] friendSessions = PresenceService.GetAgents(new string[] { exfriendID.ToString() });
|
||||||
|
@ -827,13 +827,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool LocalFriendshipTerminated(UUID exfriendID)
|
public bool LocalFriendshipTerminated(UUID userID, UUID exfriendID)
|
||||||
{
|
{
|
||||||
IClientAPI friendClient = LocateClientObject(exfriendID);
|
IClientAPI friendClient = LocateClientObject(exfriendID);
|
||||||
if (friendClient != null)
|
if (friendClient != null)
|
||||||
{
|
{
|
||||||
// the friend in this sim as root agent
|
// the friend in this sim as root agent
|
||||||
friendClient.SendTerminateFriend(exfriendID);
|
friendClient.SendTerminateFriend(userID);
|
||||||
// update local cache
|
// update local cache
|
||||||
RecacheFriends(friendClient);
|
RecacheFriends(friendClient);
|
||||||
// we're done
|
// we're done
|
||||||
|
|
|
@ -193,7 +193,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||||
if (!UUID.TryParse(request["ToID"].ToString(), out toID))
|
if (!UUID.TryParse(request["ToID"].ToString(), out toID))
|
||||||
return FailureResult();
|
return FailureResult();
|
||||||
|
|
||||||
if (m_FriendsModule.LocalFriendshipTerminated(toID))
|
if (m_FriendsModule.LocalFriendshipTerminated(fromID, toID))
|
||||||
return SuccessResult();
|
return SuccessResult();
|
||||||
|
|
||||||
return FailureResult();
|
return FailureResult();
|
||||||
|
|
Loading…
Reference in New Issue