summaryrefslogtreecommitdiff
path: root/indra/newview/llmutelist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llmutelist.cpp')
-rw-r--r--indra/newview/llmutelist.cpp36
1 files changed, 21 insertions, 15 deletions
diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp
index 841330483c..40b1c64146 100644
--- a/indra/newview/llmutelist.cpp
+++ b/indra/newview/llmutelist.cpp
@@ -67,7 +67,6 @@
#include "llfloaterchat.h"
#include "llimpanel.h"
#include "llimview.h"
-#include "lltrans.h"
#include "llnotifications.h"
#include "lluistring.h"
#include "llviewerobject.h"
@@ -507,35 +506,42 @@ void notify_automute_callback(const LLUUID& agent_id, const std::string& first_n
U32 temp_data = (U32) (uintptr_t) user_data;
LLMuteList::EAutoReason reason = (LLMuteList::EAutoReason)temp_data;
- std::string auto_message;
+ std::string notif_name;
switch (reason)
{
default:
case LLMuteList::AR_IM:
- auto_message = LLTrans::getString("AutoUnmuteByIM");
+ notif_name = "AutoUnmuteByIM";
break;
case LLMuteList::AR_INVENTORY:
- auto_message = LLTrans::getString("AutoUnmuteByInventory");
+ notif_name = "AutoUnmuteByInventory";
break;
case LLMuteList::AR_MONEY:
- auto_message = LLTrans::getString("AutoUnmuteByMoney");
+ notif_name = "AutoUnmuteByMoney";
break;
}
- std::string message = LLNotification::format(auto_message,
- LLSD().insert("FIRST", first_name).insert("LAST", last_name));
-
- if (reason == LLMuteList::AR_IM)
+ LLSD args;
+ args["FIRST"] = first_name;
+ args["LAST"] = last_name;
+
+ LLNotificationPtr notif_ptr = LLNotifications::instance().add(notif_name, args);
+ if (notif_ptr)
{
- LLFloaterIMPanel *timp = gIMMgr->findFloaterBySession(agent_id);
- if (timp)
+ std::string message = notif_ptr->getMessage();
+
+ if (reason == LLMuteList::AR_IM)
{
- timp->addHistoryLine(message);
+ LLFloaterIMPanel *timp = gIMMgr->findFloaterBySession(agent_id);
+ if (timp)
+ {
+ timp->addHistoryLine(message);
+ }
}
- }
- LLChat auto_chat(message);
- LLFloaterChat::addChat(auto_chat, FALSE, FALSE);
+ LLChat auto_chat(message);
+ LLFloaterChat::addChat(auto_chat, FALSE, FALSE);
+ }
}