Fix the offline message module to revert core changes and restore avn

specific behavior
avinationmerge
Melanie 2011-10-28 23:10:54 +02:00
parent 9b6ce41b0e
commit 175d74e68c
1 changed files with 27 additions and 17 deletions

View File

@ -208,11 +208,22 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
private void UndeliveredMessage(GridInstantMessage im)
{
if ((im.offline != 0)
&& (!im.fromGroup || (im.fromGroup && m_ForwardOfflineGroupMessages)))
if (im.dialog != (byte)InstantMessageDialog.MessageFromObject &&
im.dialog != (byte)InstantMessageDialog.MessageFromAgent &&
im.dialog != (byte)InstantMessageDialog.GroupNotice &&
im.dialog != (byte)InstantMessageDialog.GroupInvitation &&
im.dialog != (byte)InstantMessageDialog.InventoryOffered)
{
return;
}
Scene scene = FindScene(new UUID(im.fromAgentID));
if (scene == null)
scene = m_SceneList[0];
bool success = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, bool>(
"POST", m_RestURL + "/SaveMessage/", im);
"POST", m_RestURL+"/SaveMessage/?scope=" +
scene.RegionInfo.ScopeID.ToString(), im);
if (im.dialog == (byte)InstantMessageDialog.MessageFromAgent)
{
@ -224,12 +235,11 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
null, new UUID(im.toAgentID),
"System", new UUID(im.fromAgentID),
(byte)InstantMessageDialog.MessageFromAgent,
"User is not logged in. " +
"User is not logged in. "+
(success ? "Message saved." : "Message not saved"),
false, new Vector3()));
}
}
}
}
}