7171#include " llviewerregion.h"
7272#include " llcorehttputil.h"
7373#include " lluiusage.h"
74+ #include " llurlregistry.h"
7475
7576#include < array>
7677
@@ -197,6 +198,7 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg)
197198 LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::getConversation (session_id);
198199 bool store_dnd_message = false ; // flag storage of a dnd message
199200 bool is_session_focused = session_floater->isTornOff () && session_floater->hasFocus ();
201+ bool contains_mention = LLUrlRegistry::getInstance ()->containsAgentMention (msg[" message" ].asString ());
200202 if (!LLFloater::isVisible (im_box) || im_box->isMinimized ())
201203 {
202204 conversations_floater_status = CLOSED;
@@ -323,7 +325,7 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg)
323325 if (" openconversations" == user_preferences
324326 || ON_TOP == conversations_floater_status
325327 || (" toast" == user_preferences && ON_TOP != conversations_floater_status)
326- || (" flash" == user_preferences && (CLOSED == conversations_floater_status
328+ || (( " flash" == user_preferences || contains_mention) && (CLOSED == conversations_floater_status
327329 || NOT_ON_TOP == conversations_floater_status))
328330 || is_dnd_msg)
329331 {
@@ -343,7 +345,7 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg)
343345 }
344346 else
345347 {
346- im_box->flashConversationItemWidget (session_id, true );
348+ im_box->flashConversationItemWidget (session_id, true , contains_mention );
347349 }
348350 }
349351 }
@@ -3269,7 +3271,7 @@ void LLIMMgr::addMessage(
32693271 {
32703272 LLFloaterReg::showInstance (" im_container" );
32713273 LLFloaterReg::getTypedInstance<LLFloaterIMContainer>(" im_container" )->
3272- flashConversationItemWidget (new_session_id, true );
3274+ flashConversationItemWidget (new_session_id, true , LLUrlRegistry::getInstance ()-> containsAgentMention (msg) );
32733275 }
32743276}
32753277
0 commit comments