mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 18:55:58 +08:00
Improve efficiency of friends notification by only make one PresenceService call for all friends rather than one for each friend.
However, large groups could still take a very long time since we still need to message each avatar on different simulators.
This commit is contained in:
@@ -128,7 +128,7 @@ namespace OpenSim.Services.Connectors.Friends
|
||||
return Call(region, sendData);
|
||||
}
|
||||
|
||||
public bool StatusNotify(GridRegion region, UUID userID, UUID friendID, bool online)
|
||||
public bool StatusNotify(GridRegion region, UUID userID, string friendID, bool online)
|
||||
{
|
||||
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
||||
//sendData["VERSIONMIN"] = ProtocolVersions.ClientProtocolVersionMin.ToString();
|
||||
@@ -136,7 +136,7 @@ namespace OpenSim.Services.Connectors.Friends
|
||||
sendData["METHOD"] = "status";
|
||||
|
||||
sendData["FromID"] = userID.ToString();
|
||||
sendData["ToID"] = friendID.ToString();
|
||||
sendData["ToID"] = friendID;
|
||||
sendData["Online"] = online.ToString();
|
||||
|
||||
return Call(region, sendData);
|
||||
|
||||
@@ -397,7 +397,7 @@ namespace OpenSim.Services.HypergridService
|
||||
if (region != null)
|
||||
{
|
||||
m_log.DebugFormat("[HGFRIENDS SERVICE]: Remote Notify to region {0}, user {1} is {2}", region.RegionName, foreignUserID, (online ? "online" : "offline"));
|
||||
m_FriendsSimConnector.StatusNotify(region, foreignUserID, userID, online);
|
||||
m_FriendsSimConnector.StatusNotify(region, foreignUserID, userID.ToString(), online);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -504,7 +504,7 @@ namespace OpenSim.Services.HypergridService
|
||||
if (region != null)
|
||||
{
|
||||
m_log.DebugFormat("[USER AGENT SERVICE]: Remote Notify to region {0}, user {1} is {2}", region.RegionName, foreignUserID, (online ? "online" : "offline"));
|
||||
m_FriendsSimConnector.StatusNotify(region, foreignUserID, userID, online);
|
||||
m_FriendsSimConnector.StatusNotify(region, foreignUserID, userID.ToString(), online);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user