diff options
Diffstat (limited to 'indra/newview/llcallingcard.cpp')
-rw-r--r-- | indra/newview/llcallingcard.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index d988770f90..79a2631c31 100644 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -56,12 +56,14 @@ #include "llnotifications.h" #include "llnotificationsutil.h" #include "llresmgr.h" +#include "llslurl.h" #include "llimview.h" #include "llviewercontrol.h" #include "llviewernetwork.h" #include "llviewerobjectlist.h" #include "llviewerwindow.h" #include "llvoavatar.h" +#include "llavataractions.h" ///---------------------------------------------------------------------------- /// Local function declarations, constants, enums, and typedefs @@ -680,9 +682,11 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online) } BOOL notify = FALSE; LLSD args; + LLSD payload; for(S32 i = 0; i < count; ++i) { msg->getUUIDFast(_PREHASH_AgentBlock, _PREHASH_AgentID, agent_id, i); + payload["FROM_ID"] = agent_id; info = getBuddyInfo(agent_id); if(info) { @@ -715,7 +719,21 @@ void LLAvatarTracker::processNotify(LLMessageSystem* msg, bool online) if(notify) { // Popup a notify box with online status of this agent - LLNotificationPtr notification = LLNotificationsUtil::add(online ? "FriendOnline" : "FriendOffline", args); + LLNotificationPtr notification; + + if (online) + { + notification = + LLNotificationsUtil::add("FriendOnline", + args, + payload.with("respond_on_mousedown", TRUE), + boost::bind(&LLAvatarActions::startIM, agent_id)); + } + else + { + notification = + LLNotificationsUtil::add("FriendOffline", args, payload); + } // If there's an open IM session with this agent, send a notification there too. LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, agent_id); |