diff --git a/indra/newview/llnotificationscripthandler.cpp b/indra/newview/llnotificationscripthandler.cpp
index e2d4e9f8ce58937a8037d6bf082c244f8bc3e66e..19dd6d4ca0940d59585b33e1d584dd644af72d33 100644
--- a/indra/newview/llnotificationscripthandler.cpp
+++ b/indra/newview/llnotificationscripthandler.cpp
@@ -27,6 +27,7 @@
 
 #include "llviewerprecompiledheaders.h" // must be first include
 
+#include "llagent.h"
 #include "llnotificationhandler.h"
 #include "lltoastnotifypanel.h"
 #include "llviewercontrol.h"
@@ -95,6 +96,10 @@ bool LLScriptHandler::processNotification(const LLNotificationPtr& notification)
 		p.notification = notification;
 		p.panel = notify_box;
 		p.on_delete_toast = boost::bind(&LLScriptHandler::onDeleteToast, this, _1);
+		if(gAgent.isDoNotDisturb())
+		{ 
+			p.force_show = notification->getName() == "SystemMessage" || notification->getPriority() >= NOTIFICATION_PRIORITY_HIGH;
+		}
 
 		LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
 		if(channel)
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index caafb10e258552ab614601b41a56bb1c98b6f2ae..359819ec493b04e587b91537583350082a4a7dde 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -2391,7 +2391,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
 			// do nothing -- don't distract newbies in
 			// Prelude with global IMs
 		}
-		else if (offline == IM_ONLINE && is_do_not_disturb && name != SYSTEM_FROM)
+		else if (offline == IM_ONLINE && is_do_not_disturb && from_id.notNull())
 		{
 			// return a standard "do not disturb" message, but only do it to online IM 
 			// (i.e. not other auto responses and not store-and-forward IM)