aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-11-14 20:31:16 +0000
committerJustin Clark-Casey (justincc)2011-11-14 20:31:16 +0000
commite5ff7f389bcaa17634d8d93d1ffdcca36339dfeb (patch)
treedd4d55cf99cb724dfffdb488997aa723db4782ae /OpenSim/Region/CoreModules
parentminor: remove some mono compiler warnings (diff)
downloadopensim-SC-e5ff7f389bcaa17634d8d93d1ffdcca36339dfeb.zip
opensim-SC-e5ff7f389bcaa17634d8d93d1ffdcca36339dfeb.tar.gz
opensim-SC-e5ff7f389bcaa17634d8d93d1ffdcca36339dfeb.tar.bz2
opensim-SC-e5ff7f389bcaa17634d8d93d1ffdcca36339dfeb.tar.xz
Improved method doc for AddFriend() - it actually does set up a two-way relationship.
Rename IFriendsModule.AddFriend() to AddFriendship()
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/Tests/FriendModuleTests.cs5
2 files changed, 5 insertions, 4 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));