diff options
| author | Leyla Farazha <leyla@lindenlab.com> | 2010-05-28 15:48:47 -0700 |
|---|---|---|
| committer | Leyla Farazha <leyla@lindenlab.com> | 2010-05-28 15:48:47 -0700 |
| commit | 99aea0f4e7f49d202bb2b4c85cafb2c2d8aa6987 (patch) | |
| tree | 2eef41e77e793d33a43531da8be576ca813fb438 /indra/newview/llimview.cpp | |
| parent | 26b601b99e43eac623c81a60e93094577b06d209 (diff) | |
| parent | 892ac2bb1eec257bbf29d57738e819b7ff368bb9 (diff) | |
Merge
Diffstat (limited to 'indra/newview/llimview.cpp')
| -rw-r--r-- | indra/newview/llimview.cpp | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index e6db942bad..136ccbca49 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -109,6 +109,20 @@ BOOL LLSessionTimeoutTimer::tick() return TRUE; } +static void on_avatar_name_cache_toast(const LLUUID& agent_id, + const LLAvatarName& av_name, + LLSD msg) +{ + LLSD args; + args["MESSAGE"] = msg["message"]; + args["TIME"] = msg["time"]; + // *TODO: Can this ever be an object name or group name? + args["FROM"] = av_name.getCompleteName(); + args["FROM_ID"] = msg["from_id"]; + args["SESSION_ID"] = msg["session_id"]; + LLNotificationsUtil::add("IMToast", args, LLSD(), boost::bind(&LLIMFloater::show, msg["session_id"].asUUID())); +} + void toast_callback(const LLSD& msg){ // do not show toast in busy mode or it goes from agent if (gAgent.getBusy() || gAgent.getID() == msg["from_id"]) @@ -136,14 +150,9 @@ void toast_callback(const LLSD& msg){ return; } - LLSD args; - args["MESSAGE"] = msg["message"]; - args["TIME"] = msg["time"]; - args["FROM"] = msg["from"]; - args["FROM_ID"] = msg["from_id"]; - args["SESSION_ID"] = msg["session_id"]; - - LLNotificationsUtil::add("IMToast", args, LLSD(), boost::bind(&LLIMFloater::show, msg["session_id"].asUUID())); + LLAvatarNameCache::get(msg["from_id"].asUUID(), + boost::bind(&on_avatar_name_cache_toast, + _1, _2, msg)); } void LLIMModel::setActiveSessionID(const LLUUID& session_id) |
