summaryrefslogtreecommitdiff
path: root/indra/newview/llnotificationhandlerutil.cpp
diff options
context:
space:
mode:
authorMonroe Linden <monroe@lindenlab.com>2010-02-18 15:22:10 -0800
committerMonroe Linden <monroe@lindenlab.com>2010-02-18 15:22:10 -0800
commit890ec637d41330a2a91d23b09b6aaaf49738d19a (patch)
treeb093f98112fb0cfdcad5452df1b266f1e0052fc0 /indra/newview/llnotificationhandlerutil.cpp
parent1d1e4c7abe5c46cfafbc351e8cad3197d2befefc (diff)
parent4ab945c9f0000ead1eca22eefe0829bf3c15d7da (diff)
Automated merge with ssh://hg.lindenlab.com/q/viewer-hotfix
Diffstat (limited to 'indra/newview/llnotificationhandlerutil.cpp')
-rw-r--r--indra/newview/llnotificationhandlerutil.cpp29
1 files changed, 4 insertions, 25 deletions
diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp
index b8e0892b02..c187ee7bf2 100644
--- a/indra/newview/llnotificationhandlerutil.cpp
+++ b/indra/newview/llnotificationhandlerutil.cpp
@@ -94,7 +94,8 @@ bool LLHandlerUtil::canSpawnIMSession(const LLNotificationPtr& notification)
// static
bool LLHandlerUtil::canAddNotifPanelToIM(const LLNotificationPtr& notification)
{
- return OFFER_FRIENDSHIP == notification->getName();
+ return OFFER_FRIENDSHIP == notification->getName()
+ || USER_GIVE_ITEM == notification->getName();
}
@@ -220,6 +221,7 @@ void LLHandlerUtil::logToNearbyChat(const LLNotificationPtr& notification, EChat
{
LLChat chat_msg(notification->getMessage());
chat_msg.mSourceType = type;
+ chat_msg.mFromName = SYSTEM_FROM;
nearby_chat->addMessage(chat_msg);
}
}
@@ -264,31 +266,8 @@ void LLHandlerUtil::addNotifPanelToIM(const LLNotificationPtr& notification)
offer["from_id"] = notification->getPayload()["from_id"];
offer["from"] = name;
offer["time"] = LLLogChat::timestamp(true);
+ offer["index"] = (LLSD::Integer)session->mMsgs.size();
session->mMsgs.push_front(offer);
LLIMFloater::show(session_id);
}
-
-// static
-void LLHandlerUtil::reloadIMFloaterMessages(
- const LLNotificationPtr& notification)
-{
- LLUUID from_id = notification->getPayload()["from_id"];
- LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, from_id);
- LLIMFloater* im_floater = LLFloaterReg::findTypedInstance<LLIMFloater>(
- "impanel", session_id);
- if (im_floater != NULL)
- {
- LLIMModel::LLIMSession * session = LLIMModel::getInstance()->findIMSession(
- session_id);
- if(session != NULL)
- {
- session->mMsgs.clear();
- std::list<LLSD> chat_history;
- LLLogChat::loadAllHistory(session->mHistoryFileName, chat_history);
- session->addMessagesFromHistory(chat_history);
- }
-
- im_floater->reloadMessages();
- }
-}