summaryrefslogtreecommitdiff
path: root/indra/newview/llimhandler.cpp
diff options
context:
space:
mode:
authorBryan O'Sullivan <bos@lindenlab.com>2009-09-14 14:31:25 -0700
committerBryan O'Sullivan <bos@lindenlab.com>2009-09-14 14:31:25 -0700
commit562006aa5585a42418cae978516505035cd34d8d (patch)
treef42488d1b07907937f5b9e236617d9f02297d32d /indra/newview/llimhandler.cpp
parent9a8042d5a3edfd07727793a1939c3ab361ceec9a (diff)
parent7cd1020f2953b776e1878e7b4e365d4b23e6b07b (diff)
Merge with SVN viewer-2.0.0-3 branch
Diffstat (limited to 'indra/newview/llimhandler.cpp')
-rw-r--r--indra/newview/llimhandler.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/newview/llimhandler.cpp b/indra/newview/llimhandler.cpp
index 0262e40803..a47477c446 100644
--- a/indra/newview/llimhandler.cpp
+++ b/indra/newview/llimhandler.cpp
@@ -35,6 +35,7 @@
#include "llnotificationhandler.h"
+#include "llagentdata.h"
#include "llbottomtray.h"
#include "llviewercontrol.h"
#include "lltoastimpanel.h"
@@ -77,9 +78,15 @@ void LLIMHandler::processNotification(const LLSD& notify)
{
LLSD substitutions = notification->getSubstitutions();
+ // According to comments in LLIMMgr::addMessage(), if we get message
+ // from ourselves, the sender id is set to null. This fixes EXT-875.
+ LLUUID avatar_id = substitutions["FROM_ID"].asUUID();
+ if (avatar_id.isNull())
+ avatar_id = gAgentID;
+
LLToastIMPanel::Params im_p;
im_p.notification = notification;
- im_p.avatar_id = substitutions["FROM_ID"].asUUID();
+ im_p.avatar_id = avatar_id;
im_p.from = substitutions["FROM"].asString();
im_p.time = substitutions["TIME"].asString();
im_p.message = substitutions["MESSAGE"].asString();