diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index d1ddf598d..ecf14398e 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -1267,3 +1267,8 @@ void LLAvatarActions::copyUUIDs(const uuid_vec_t& ids) if (!ids_string.empty()) gViewerWindow->getWindow()->copyTextToClipboard(utf8str_to_wstring(ids_string)); } + +std::string LLAvatarActions::getSLURL(const LLUUID& id) +{ + return llformat("secondlife:///app/agent/%s/about", id.asString()); +} diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h index e4b313266..2c3199942 100644 --- a/indra/newview/llavataractions.h +++ b/indra/newview/llavataractions.h @@ -241,6 +241,11 @@ public: */ static void copyUUIDs(const uuid_vec_t& id); + /** + * @return slurl string from agent ID + */ + static std::string getSLURL(const LLUUID& id); + private: static bool callbackAddFriendWithMessage(const LLSD& notification, const LLSD& response); static bool handleRemove(const LLSD& notification, const LLSD& response); diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp index d97cd8d35..b8763f00b 100644 --- a/indra/newview/llgroupactions.cpp +++ b/indra/newview/llgroupactions.cpp @@ -601,3 +601,8 @@ LLFloaterGroupInfo* LLGroupActions::openGroupProfile(const LLUUID& group_id) return fgi; } +std::string LLGroupActions::getSLURL(const LLUUID& id) +{ + return llformat("secondlife:///app/group/%s/about", id.asString()); +} + diff --git a/indra/newview/llgroupactions.h b/indra/newview/llgroupactions.h index 0cce7460b..ac2b0f10d 100644 --- a/indra/newview/llgroupactions.h +++ b/indra/newview/llgroupactions.h @@ -121,6 +121,11 @@ public: */ static bool isAvatarMemberOfGroup(const LLUUID& group_id, const LLUUID& avatar_id); + /** + * @return slurl string from group ID + */ + static std::string getSLURL(const LLUUID& id); + private: static bool onJoinGroup(const LLSD& notification, const LLSD& response); static bool onLeaveGroup(const LLSD& notification, const LLSD& response);