Friends online notifications upon friendship now working (same sim only).
parent
a4472ceeac
commit
3906a14857
|
@ -432,6 +432,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
|||
GridInstantMessage im = new GridInstantMessage(client.Scene, client.AgentId, client.Name, friendID,
|
||||
(byte)OpenMetaverse.InstantMessageDialog.FriendshipAccepted, client.AgentId.ToString(), false, Vector3.Zero);
|
||||
friendClient.SendInstantMessage(im);
|
||||
client.SendAgentOnline(new UUID[] { friendID });
|
||||
// we're done
|
||||
return;
|
||||
}
|
||||
|
@ -442,7 +443,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
|||
{
|
||||
GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.RegionID);
|
||||
m_FriendsSimConnector.FriendshipApproved(region, agentID, friendID);
|
||||
client.SendAgentOnline(new UUID[] { friendID });
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void OnDenyFriendRequest(IClientAPI client, UUID agentID, UUID friendID, List<UUID> callingCardFolders)
|
||||
|
|
|
@ -123,6 +123,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
|||
return;
|
||||
|
||||
IClientAPI client = (IClientAPI)sender;
|
||||
m_log.DebugFormat("[PRESENCE MODULE]: OnlineNotification requested by {0}", client.Name);
|
||||
|
||||
PresenceInfo[] status = PresenceService.GetAgents(args.ToArray());
|
||||
|
||||
|
@ -131,10 +132,21 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
|||
|
||||
foreach (PresenceInfo pi in status)
|
||||
{
|
||||
UUID uuid = new UUID(pi.UserID);
|
||||
if (pi.Online)
|
||||
online.Add(new UUID(pi.UserID));
|
||||
{
|
||||
if (!online.Contains(uuid))
|
||||
{
|
||||
online.Add(uuid);
|
||||
if (offline.Contains(uuid))
|
||||
offline.Remove(uuid);
|
||||
}
|
||||
}
|
||||
else
|
||||
offline.Add(new UUID(pi.UserID));
|
||||
{
|
||||
if (!online.Contains(uuid) && !offline.Contains(uuid))
|
||||
offline.Add(uuid);
|
||||
}
|
||||
}
|
||||
|
||||
if (online.Count > 0)
|
||||
|
|
Loading…
Reference in New Issue