summaryrefslogtreecommitdiff
path: root/indra/newview/llavataractions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llavataractions.cpp')
-rwxr-xr-xindra/newview/llavataractions.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index d6e457887b..b513a52ff7 100755
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -44,6 +44,7 @@
#include "llcallingcard.h" // for LLAvatarTracker
#include "llconversationlog.h"
#include "llfloateravatarpicker.h" // for LLFloaterAvatarPicker
+#include "llfloaterconversationpreview.h"
#include "llfloatergroupinvite.h"
#include "llfloatergroups.h"
#include "llfloaterreg.h"
@@ -192,7 +193,7 @@ static void on_avatar_name_cache_start_im(const LLUUID& agent_id,
// static
void LLAvatarActions::startIM(const LLUUID& id)
{
- if (id.isNull())
+ if (id.isNull() || gAgent.getID() == id)
return;
LLAvatarNameCache::get(id, boost::bind(&on_avatar_name_cache_start_im, _1, _2));
@@ -926,9 +927,20 @@ void LLAvatarActions::viewChatHistory(const LLUUID& id)
if (iter->getParticipantID() == id)
{
LLFloaterReg::showInstance("preview_conversation", iter->getSessionID(), true);
- break;
+ return;
}
}
+
+ if (LLLogChat::isTranscriptExist(id))
+ {
+ LLAvatarName avatar_name;
+ LLSD extended_id(id);
+
+ LLAvatarNameCache::get(id, &avatar_name);
+ extended_id[LL_FCP_COMPLETE_NAME] = avatar_name.getCompleteName();
+ extended_id[LL_FCP_ACCOUNT_NAME] = avatar_name.getAccountName();
+ LLFloaterReg::showInstance("preview_conversation", extended_id, true);
+ }
}
//== private methods ========================================================================================