diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp index e164aa8fc45f6cdcc8c9af0659b9f4b6617e95bf..81edb55f93085c04b6c1b3192dd4150ce524bf2e 100644 --- a/indra/newview/llchatitemscontainerctrl.cpp +++ b/indra/newview/llchatitemscontainerctrl.cpp @@ -144,6 +144,7 @@ void LLNearbyChatToastPanel::init(LLSD& notification) std::string messageText = notification["message"].asString(); // UTF-8 line of text std::string fromName = notification["from"].asString(); // agent or object name mFromID = notification["from_id"].asUUID(); // agent id or object id + mFromName = fromName; int sType = notification["source"].asInteger(); mSourceType = (EChatSourceType)sType; diff --git a/indra/newview/llchatitemscontainerctrl.h b/indra/newview/llchatitemscontainerctrl.h index 4d730573d9694a2362749d936a37c4ee4fb1eaee..b28c9dbc4b7f4fdfbdec127038a531f85cab5b51 100644 --- a/indra/newview/llchatitemscontainerctrl.h +++ b/indra/newview/llchatitemscontainerctrl.h @@ -60,6 +60,7 @@ class LLNearbyChatToastPanel: public LLToastPanelBase static LLNearbyChatToastPanel* createInstance(); const LLUUID& getFromID() const { return mFromID;} + const std::string& getFromName() const { return mFromName; } //void addText (const std::string& message , const LLStyle::Params& input_params = LLStyle::Params()); //void setMessage (const LLChat& msg); @@ -84,9 +85,11 @@ class LLNearbyChatToastPanel: public LLToastPanelBase virtual void draw(); + //*TODO REMOVE, why a dup of getFromID? const LLUUID& messageID() const { return mFromID;} private: LLUUID mFromID; // agent id or object id + std::string mFromName; EChatSourceType mSourceType; diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index a211adc79d4f9d82529bf93c5579b885aa88ba86..08ae93c3a6a1f8d9212bd2d9d5f06cc0e6e4f008 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -176,10 +176,11 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification) if(m_active_toasts.size()) { LLUUID fromID = notification["from_id"].asUUID(); // agent id or object id + std::string from = notification["from"].asString(); LLToast* toast = m_active_toasts[0]; LLNearbyChatToastPanel* panel = dynamic_cast<LLNearbyChatToastPanel*>(toast->getPanel()); - if(panel && panel->messageID() == fromID && panel->canAddText()) + if(panel && panel->messageID() == fromID && panel->getFromName() == from && panel->canAddText()) { panel->addMessage(notification); toast->reshapeToPanel();