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

suppresses "Inventory Saved" messages.
avinationmerge
Melanie Thielker 2010-08-04 02:51:41 +02:00
parent d57bfec702
commit 5ff9db7388
2 changed files with 10 additions and 6 deletions

View File

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

View File

@ -185,13 +185,16 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
{ {
UndeliveredMessage handlerUndeliveredMessage = OnUndeliveredMessage; UndeliveredMessage handlerUndeliveredMessage = OnUndeliveredMessage;
// If this event has handlers, then the IM will be considered // If this event has handlers, then an IM from an agent will be
// delivered. This will suppress the error message. // considered delivered. This will suppress the error message.
// //
if (handlerUndeliveredMessage != null) if (handlerUndeliveredMessage != null)
{ {
handlerUndeliveredMessage(im); handlerUndeliveredMessage(im);
if (im.dialog == (byte)InstantMessageDialog.MessageFromAgent)
result(true); result(true);
else
result(false);
return; return;
} }
@ -504,14 +507,14 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
// //
if (upd.RegionID == prevRegionID) 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); HandleUndeliveredMessage(im, result);
return; return;
} }
} }
else 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); HandleUndeliveredMessage(im, result);
return; return;
} }