diff options
author | James Cook <james@lindenlab.com> | 2010-05-13 15:47:32 -0700 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2010-05-13 15:47:32 -0700 |
commit | 8b524549902b780c2833691368bc35bdb1837cd9 (patch) | |
tree | b742a7f5463fb42663fa51e1029c80671ceb881b /indra/newview/llchathistory.cpp | |
parent | 14f423a23c38bf554e9633752074fbcabd92599c (diff) | |
parent | aebb49520b1919e0ac2bcc7373fc2db031e3b7f0 (diff) |
merge pull from dessie/viewer-public, picking up SLE code
Diffstat (limited to 'indra/newview/llchathistory.cpp')
-rw-r--r-- | indra/newview/llchathistory.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index b3f9bb1dc1..5bf3d7b913 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -658,20 +658,19 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL if ( chat.mSourceType == CHAT_SOURCE_OBJECT && chat.mFromID.notNull()) { // for object IMs, create a secondlife:///app/objectim SLapp - std::string url = LLSLURL::buildCommand("objectim", chat.mFromID, ""); + std::string url = LLSLURL("objectim", chat.mFromID, "").getSLURLString(); url += "?name=" + chat.mFromName; url += "&owner=" + args["owner_id"].asString(); std::string slurl = args["slurl"].asString(); if (slurl.empty()) { - LLViewerRegion *region = LLWorld::getInstance()->getRegionFromPosAgent(chat.mPosAgent); - if (region) - { - S32 x, y, z; - LLSLURL::globalPosToXYZ(LLVector3d(chat.mPosAgent), x, y, z); - slurl = region->getName() + llformat("/%d/%d/%d", x, y, z); - } + LLViewerRegion *region = LLWorld::getInstance()->getRegionFromPosAgent(chat.mPosAgent); + if(region) + { + LLSLURL region_slurl(region->getName(), chat.mPosAgent); + slurl = region_slurl.getLocationString(); + } } url += "&slurl=" + slurl; |