summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-01-14 13:55:00 -0800
committerTofu Linden <tofu.linden@lindenlab.com>2010-01-14 13:55:00 -0800
commit04fe0399443cf4a5852e94cd3950ba1fd2d50562 (patch)
tree805e57d9bc12d869e87994380d5b023137fef48f /indra/newview/llviewermessage.cpp
parentaf2cbcee129911cb4e1d25fbd710d755c13b0282 (diff)
Backed out changeset d5b761982e63
This got pushed too early - sorry. Sigh.
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r--indra/newview/llviewermessage.cpp56
1 files changed, 33 insertions, 23 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 43c7574830..42c45589c0 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -904,19 +904,7 @@ void open_inventory_offer(const std::vector<LLUUID>& items, const std::string& f
LLPanelPlaces *places_panel = dynamic_cast<LLPanelPlaces*>(LLSideTray::getInstance()->showPanel("panel_places", LLSD()));
if (places_panel)
{
- // we are creating a landmark
- if("create_landmark" == places_panel->getPlaceInfoType() && !places_panel->getItem())
- {
- places_panel->setItem(item);
- }
- // we are opening a group notice attachment
- else
- {
- LLSD args;
- args["type"] = "landmark";
- args["id"] = item_id;
- LLSideTray::getInstance()->showPanel("panel_places", args);
- }
+ places_panel->setItem(item);
}
}
}
@@ -1110,6 +1098,28 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
gCacheName->get(mFromID, mFromGroup, boost::bind(&inventory_offer_mute_callback,_1,_2,_3,_4,this));
}
+ // *NOTE dzaporozhan
+ // Restored from viewer-1-23 to fix EXT-3520
+ // Saves Group Notice Attachments to inventory.
+ LLMessageSystem* msg = gMessageSystem;
+ msg->newMessageFast(_PREHASH_ImprovedInstantMessage);
+ msg->nextBlockFast(_PREHASH_AgentData);
+ msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
+ msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+ msg->nextBlockFast(_PREHASH_MessageBlock);
+ msg->addBOOLFast(_PREHASH_FromGroup, FALSE);
+ msg->addUUIDFast(_PREHASH_ToAgentID, mFromID);
+ msg->addU8Fast(_PREHASH_Offline, IM_ONLINE);
+ msg->addUUIDFast(_PREHASH_ID, mTransactionID);
+ msg->addU32Fast(_PREHASH_Timestamp, NO_TIMESTAMP); // no timestamp necessary
+ std::string name;
+ LLAgentUI::buildFullname(name);
+ msg->addStringFast(_PREHASH_FromAgentName, name);
+ msg->addStringFast(_PREHASH_Message, "");
+ msg->addU32Fast(_PREHASH_ParentEstateID, 0);
+ msg->addUUIDFast(_PREHASH_RegionID, LLUUID::null);
+ msg->addVector3Fast(_PREHASH_Position, gAgent.getPositionAgent());
+
std::string from_string; // Used in the pop-up.
std::string chatHistory_string; // Used in chat history.
@@ -1145,10 +1155,8 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
}
}
break;
- case IM_GROUP_NOTICE:
- send_auto_receive_response();
- break;
case IM_TASK_INVENTORY_OFFERED:
+ case IM_GROUP_NOTICE:
case IM_GROUP_NOTICE_REQUESTED:
// This is an offer from a task or group.
// We don't use a new instance of an opener
@@ -1163,6 +1171,10 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
// end switch (mIM)
case IOR_ACCEPT:
+ msg->addU8Fast(_PREHASH_Dialog, (U8)(mIM + 1));
+ msg->addBinaryDataFast(_PREHASH_BinaryBucket, &(mFolderID.mData), sizeof(mFolderID.mData));
+ msg->sendReliable(mHost);
+
//don't spam them if they are getting flooded
if (check_offer_throttle(mFromName, true))
{
@@ -1185,10 +1197,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
{
chat.mMuted = TRUE;
}
-
- // *NOTE dzaporozhan
- // Disabled logging to old chat floater to fix crash in group notices - EXT-4149
- // LLFloaterChat::addChatHistory(chat);
+ LLFloaterChat::addChatHistory(chat);
LLInventoryFetchComboObserver::folder_ref_t folders;
LLInventoryFetchComboObserver::item_ref_t items;
@@ -1759,9 +1768,10 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
}
else if (from_id.isNull())
{
- LLSD args;
- args["MESSAGE"] = message;
- LLNotificationsUtil::add("SystemMessage", args);
+ // Messages from "Second Life" ID don't go to IM history
+ // messages which should be routed to IM window come from a user ID with name=SYSTEM_NAME
+ chat.mText = name + ": " + message;
+ LLFloaterChat::addChat(chat, FALSE, FALSE);
}
else if (to_id.isNull())
{