mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
we do need to ship the cached friends around on teleports (friends must come from grid)
This commit is contained in:
@@ -280,7 +280,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||
}
|
||||
}
|
||||
|
||||
public void CacheFriendOnline(UUID userID, UUID friendID, bool online)
|
||||
public virtual void CacheFriendOnline(UUID userID, UUID friendID, bool online)
|
||||
{
|
||||
if (!m_OnlineFriendsCache.TryGetValue(userID, out HashSet<UUID> friends))
|
||||
{
|
||||
@@ -292,6 +292,18 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||
else
|
||||
friends.Remove(friendID);
|
||||
}
|
||||
public virtual List<UUID> GetCachedFriendsOnline(UUID userID)
|
||||
{
|
||||
if (m_OnlineFriendsCache.TryGetValue(userID, out HashSet<UUID> friends))
|
||||
{
|
||||
List<UUID> friendslst = new List<UUID>(friends.Count);
|
||||
foreach(UUID id in friends)
|
||||
friendslst.Add(id);
|
||||
return friendslst;
|
||||
}
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
private void OnMakeRootAgent(ScenePresence sp)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user