From 348d15707d129c99bc79cd35d544bc62b9a6f1b2 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Mon, 14 Nov 2011 18:08:02 +0000
Subject: Add test for adding a friend whilst online
---
OpenSim/Data/Null/NullFriendsData.cs | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Data')
diff --git a/OpenSim/Data/Null/NullFriendsData.cs b/OpenSim/Data/Null/NullFriendsData.cs
index d90788a..0a4b242 100644
--- a/OpenSim/Data/Null/NullFriendsData.cs
+++ b/OpenSim/Data/Null/NullFriendsData.cs
@@ -56,13 +56,21 @@ namespace OpenSim.Data.Null
///
public FriendsData[] GetFriends(string userID)
{
- List lst = m_Data.FindAll(delegate (FriendsData fdata)
+ List lst = m_Data.FindAll(fdata =>
{
return fdata.PrincipalID == userID.ToString();
});
if (lst != null)
+ {
+ lst.ForEach(f =>
+ {
+ FriendsData f2 = m_Data.Find(candidateF2 => f.Friend == candidateF2.PrincipalID);
+ if (f2 != null) { f.Data["TheirFlags"] = f2.Data["Flags"]; }
+ });
+
return lst.ToArray();
+ }
return new FriendsData[0];
}
--
cgit v1.1