summaryrefslogtreecommitdiff
path: root/indra/newview/lltoastimpanel.cpp
diff options
context:
space:
mode:
authormaxim_productengine <mnikolenko@productengine.com>2018-03-22 17:56:12 +0200
committermaxim_productengine <mnikolenko@productengine.com>2018-03-22 17:56:12 +0200
commit7e5a092ba1126f0527e915a7bfadb92e989880c7 (patch)
tree771a786e8c68954179db50664639e6194e411cbc /indra/newview/lltoastimpanel.cpp
parent00c6c29daf1250f4be217077fd3156e799f65e91 (diff)
MAINT-8415 FIXED Group chat toast ignores IRC-like formatting
Diffstat (limited to 'indra/newview/lltoastimpanel.cpp')
-rw-r--r--indra/newview/lltoastimpanel.cpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp
index 39adfb3431..c4c4b13a2f 100644
--- a/indra/newview/lltoastimpanel.cpp
+++ b/indra/newview/lltoastimpanel.cpp
@@ -65,14 +65,9 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif
LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(p.session_id);
mIsGroupMsg = (im_session && im_session->mSessionType == LLIMModel::LLIMSession::GROUP_SESSION);
- if(mIsGroupMsg)
- {
- mAvatarName->setValue(im_session->mName);
- LLAvatarName avatar_name;
- LLAvatarNameCache::get(p.avatar_id, &avatar_name);
- p.message = "[From " + avatar_name.getDisplayName() + "]\n" + p.message;
- }
-
+ std::string title = mIsGroupMsg ? im_session->mName : p.from;
+ mAvatarName->setValue(title);
+
//Handle IRC styled /me messages.
std::string prefix = p.message.substr(0, 4);
if (prefix == "/me " || prefix == "/me'")
@@ -88,14 +83,16 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif
}
else
{
+ if (mIsGroupMsg)
+ {
+ LLAvatarName avatar_name;
+ LLAvatarNameCache::get(p.avatar_id, &avatar_name);
+ p.message = "[From " + avatar_name.getDisplayName() + "]\n" + p.message;
+ }
style_params.font.style = "NORMAL";
mMessage->setText(p.message, style_params);
}
- if(!mIsGroupMsg)
- {
- mAvatarName->setValue(p.from);
- }
mTime->setValue(p.time);
mSessionID = p.session_id;
mAvatarID = p.avatar_id;