aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/Tests/FriendModuleTests.cs5
-rw-r--r--OpenSim/Region/Framework/Interfaces/IFriendsModule.cs7
3 files changed, 7 insertions, 9 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
index 31ffc4d..7a2a46e 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
@@ -572,10 +572,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
572 { 572 {
573 m_log.DebugFormat("[FRIENDS]: {0} accepted friendship from {1}", client.AgentId, friendID); 573 m_log.DebugFormat("[FRIENDS]: {0} accepted friendship from {1}", client.AgentId, friendID);
574 574
575 AddFriend(client, friendID); 575 AddFriendship(client, friendID);
576 } 576 }
577 577
578 public void AddFriend(IClientAPI client, UUID friendID) 578 public void AddFriendship(IClientAPI client, UUID friendID)
579 { 579 {
580 StoreFriendships(client.AgentId, friendID); 580 StoreFriendships(client.AgentId, friendID);
581 581
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/Tests/FriendModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Friends/Tests/FriendModuleTests.cs
index 942091c..c945dcf 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/Tests/FriendModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/Tests/FriendModuleTests.cs
@@ -87,8 +87,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends.Tests
87 ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, userId); 87 ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, userId);
88 SceneHelpers.AddScenePresence(m_scene, user2Id); 88 SceneHelpers.AddScenePresence(m_scene, user2Id);
89 89
90 // This friendship is currently only one-way, which might be pathalogical in Second Life. 90 // This fiendship is two-way but without a connector, only the first user will receive the online
91 m_fm.AddFriend(sp.ControllingClient, user2Id); 91 // notification.
92 m_fm.AddFriendship(sp.ControllingClient, user2Id);
92 93
93 Assert.That(((TestClient)sp.ControllingClient).OfflineNotificationsReceived.Count, Is.EqualTo(0)); 94 Assert.That(((TestClient)sp.ControllingClient).OfflineNotificationsReceived.Count, Is.EqualTo(0));
94 Assert.That(((TestClient)sp.ControllingClient).OnlineNotificationsReceived.Count, Is.EqualTo(1)); 95 Assert.That(((TestClient)sp.ControllingClient).OnlineNotificationsReceived.Count, Is.EqualTo(1));
diff --git a/OpenSim/Region/Framework/Interfaces/IFriendsModule.cs b/OpenSim/Region/Framework/Interfaces/IFriendsModule.cs
index 8143164..fdede34 100644
--- a/OpenSim/Region/Framework/Interfaces/IFriendsModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IFriendsModule.cs
@@ -34,18 +34,15 @@ namespace OpenSim.Region.Framework.Interfaces
34 public interface IFriendsModule 34 public interface IFriendsModule
35 { 35 {
36 /// <summary> 36 /// <summary>
37 /// Add a friend for the given user. 37 /// Add a friendship between two users.
38 /// </summary> 38 /// </summary>
39 /// <remarks> 39 /// <remarks>
40 /// This is a one-way friendship. To make a two way friendship you will need to call this again with the
41 /// client and friend reversed.
42 ///
43 /// Ultimately, it would be more useful to take in a user account here rather than having to have a user 40 /// Ultimately, it would be more useful to take in a user account here rather than having to have a user
44 /// present in the scene. 41 /// present in the scene.
45 /// </remarks> 42 /// </remarks>
46 /// <param name="client"></param> 43 /// <param name="client"></param>
47 /// <param name="friendID"></param> 44 /// <param name="friendID"></param>
48 void AddFriend(IClientAPI client, UUID friendID); 45 void AddFriendship(IClientAPI client, UUID friendID);
49 46
50 uint GetFriendPerms(UUID PrincipalID, UUID FriendID); 47 uint GetFriendPerms(UUID PrincipalID, UUID FriendID);
51 bool SendFriendsOnlineIfNeeded(IClientAPI client); 48 bool SendFriendsOnlineIfNeeded(IClientAPI client);