diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h
index 62daf5f105c568e2c6ab19fe06c5e11bd713d042..62008b91a0724a907ced74ca28950dd52bf531c5 100644
--- a/indra/newview/llnotificationhandler.h
+++ b/indra/newview/llnotificationhandler.h
@@ -356,6 +356,11 @@ class LLHandlerUtil
 	 */
 	static void addNotifPanelToIM(const LLNotificationPtr& notification);
 
+	/**
+	 * Updates messages of IM floater.
+	 */
+	static void updateIMFLoaterMesages(const LLUUID& session_id);
+
 	/**
 	 * Updates messages of visible IM floater.
 	 */
diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp
index 5affd5c6775de14f6f718192aabbd39a9fc9eabc..55e0f33121be85edd00309794c329641c4146b93 100644
--- a/indra/newview/llnotificationhandlerutil.cpp
+++ b/indra/newview/llnotificationhandlerutil.cpp
@@ -252,6 +252,9 @@ void LLHandlerUtil::logToIM(const EInstantMessage& session_type,
 		session->mNumUnread = unread;
 		session->mParticipantUnreadMessageCount = participant_unread;
 
+		// update IM floater messages
+		updateIMFLoaterMesages(session_id);
+
 		// restore active session id
 		if (active_session_id.isNull())
 		{
@@ -415,12 +418,8 @@ void LLHandlerUtil::addNotifPanelToIM(const LLNotificationPtr& notification)
 }
 
 // static
-void LLHandlerUtil::updateVisibleIMFLoaterMesages(const LLNotificationPtr& notification)
+void LLHandlerUtil::updateIMFLoaterMesages(const LLUUID& session_id)
 {
-	const std::string name = LLHandlerUtil::getSubstitutionName(notification);
-	LLUUID from_id = notification->getPayload()["from_id"];
-	LLUUID session_id = spawnIMSession(name, from_id);
-
 	LLIMFloater* im_floater = LLIMFloater::findInstance(session_id);
 	if (im_floater != NULL && im_floater->getVisible())
 	{
@@ -428,6 +427,16 @@ void LLHandlerUtil::updateVisibleIMFLoaterMesages(const LLNotificationPtr& notif
 	}
 }
 
+// static
+void LLHandlerUtil::updateVisibleIMFLoaterMesages(const LLNotificationPtr& notification)
+{
+	const std::string name = LLHandlerUtil::getSubstitutionName(notification);
+	LLUUID from_id = notification->getPayload()["from_id"];
+	LLUUID session_id = spawnIMSession(name, from_id);
+
+	updateIMFLoaterMesages(session_id);
+}
+
 // static
 void LLHandlerUtil::decIMMesageCounter(const LLNotificationPtr& notification)
 {