aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
authorMcCabe Maxsted2009-09-11 20:20:13 -0700
committerMcCabe Maxsted2009-09-11 20:20:13 -0700
commit23eb89d76a254235872b530e047c1f39df1d122a (patch)
tree95c843ae96607d2c1221dcb49b266d154eae213a /linden/indra/newview/llviewermessage.cpp
parentFixed profile account info spacing (diff)
parentBackported clickable object names from 1.23 (diff)
downloadmeta-impy-23eb89d76a254235872b530e047c1f39df1d122a.zip
meta-impy-23eb89d76a254235872b530e047c1f39df1d122a.tar.gz
meta-impy-23eb89d76a254235872b530e047c1f39df1d122a.tar.bz2
meta-impy-23eb89d76a254235872b530e047c1f39df1d122a.tar.xz
Merged in 1.2.0-objectnames
Diffstat (limited to 'linden/indra/newview/llviewermessage.cpp')
-rw-r--r--linden/indra/newview/llviewermessage.cpp50
1 files changed, 43 insertions, 7 deletions
diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp
index e4de5b4..815dc49 100644
--- a/linden/indra/newview/llviewermessage.cpp
+++ b/linden/indra/newview/llviewermessage.cpp
@@ -1802,15 +1802,51 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1802 break; 1802 break;
1803 1803
1804 case IM_FROM_TASK: 1804 case IM_FROM_TASK:
1805 if (is_busy && !is_owned_by_me)
1806 { 1805 {
1807 return; 1806 if (is_busy && !is_owned_by_me)
1807 {
1808 return;
1809 }
1810 chat.mText = name + separator_string + message.substr(message_offset);
1811 chat.mFromName = name;
1812
1813 // Build a link to open the object IM info window.
1814 std::string location = ll_safe_string((char*)binary_bucket,binary_bucket_size);
1815
1816 LLSD query_string;
1817 query_string["owner"] = from_id;
1818 query_string["slurl"] = location.c_str();
1819 query_string["name"] = name;
1820 if (from_group)
1821 {
1822 query_string["groupowned"] = "true";
1823 }
1824
1825 if (session_id.notNull())
1826 {
1827 chat.mFromID = session_id;
1828 }
1829 else
1830 {
1831 // This message originated on a region without the updated code for task id and slurl information.
1832 // We just need a unique ID for this object that isn't the owner ID.
1833 // If it is the owner ID it will overwrite the style that contains the link to that owner's profile.
1834 // This isn't ideal - it will make 1 style for all objects owned by the the same person/group.
1835 // This works because the only thing we can really do in this case is show the owner name and link to their profile.
1836 chat.mFromID = from_id ^ gAgent.getSessionID();
1837 }
1838
1839 std::ostringstream link;
1840 link << "secondlife:///app/objectim/" << session_id
1841 << LLURI::mapToQueryString(query_string);
1842
1843 chat.mURL = link.str();
1844
1845 // Note: lie to LLFloaterChat::addChat(), pretending that this is NOT an IM, because
1846 // IMs from objcts don't open IM sessions.
1847 chat.mSourceType = CHAT_SOURCE_OBJECT;
1848 LLFloaterChat::addChat(chat, FALSE, FALSE);
1808 } 1849 }
1809 chat.mText = name + separator_string + message.substr(message_offset);
1810 // Note: lie to LLFloaterChat::addChat(), pretending that this is NOT an IM, because
1811 // IMs from objcts don't open IM sessions.
1812 chat.mSourceType = CHAT_SOURCE_OBJECT;
1813 LLFloaterChat::addChat(chat, FALSE, FALSE);
1814 break; 1850 break;
1815 case IM_FROM_TASK_AS_ALERT: 1851 case IM_FROM_TASK_AS_ALERT:
1816 if (is_busy && !is_owned_by_me) 1852 if (is_busy && !is_owned_by_me)