Skip to content
Snippets Groups Projects
Commit 55f1a96d authored by Igor Borovkov's avatar Igor Borovkov
Browse files

fixed EXT-5731 Viewer 2: New chat format doesn't recognise scripted object name changes

--HG--
branch : product-engine
parent bf25f3fd
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
......@@ -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;
......
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment