Clean up some messiness in IM sending. Having offline IM enabled now no longer

suppresses "Inventory Saved" messages.
prebuild-update
Melanie Thielker 2010-08-04 02:51:41 +02:00 committed by Melanie
parent 9ee712459b
commit bda83715e4
2 changed files with 10 additions and 6 deletions

View File

@ -162,7 +162,8 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
delegate(bool success)
{
if (dialog == (uint)InstantMessageDialog.StartTyping ||
dialog == (uint)InstantMessageDialog.StopTyping)
dialog == (uint)InstantMessageDialog.StopTyping ||
dialog == (uint)InstantMessageDialog.MessageFromObject)
{
return;
}

View File

@ -185,13 +185,16 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
{
UndeliveredMessage handlerUndeliveredMessage = OnUndeliveredMessage;
// If this event has handlers, then the IM will be considered
// delivered. This will suppress the error message.
// If this event has handlers, then an IM from an agent will be
// considered delivered. This will suppress the error message.
//
if (handlerUndeliveredMessage != null)
{
handlerUndeliveredMessage(im);
result(true);
if (im.dialog == (byte)InstantMessageDialog.MessageFromAgent)
result(true);
else
result(false);
return;
}
@ -504,14 +507,14 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
//
if (upd.RegionID == prevRegionID)
{
m_log.Error("[GRID INSTANT MESSAGE]: Unable to deliver an instant message");
// m_log.Error("[GRID INSTANT MESSAGE]: Unable to deliver an instant message");
HandleUndeliveredMessage(im, result);
return;
}
}
else
{
m_log.Error("[GRID INSTANT MESSAGE]: Unable to deliver an instant message");
// m_log.Error("[GRID INSTANT MESSAGE]: Unable to deliver an instant message");
HandleUndeliveredMessage(im, result);
return;
}