Fix group inventory receiveds not displaying properly in chat history

Also fix linking to an avatar profile when a group's object gives an item
This commit is contained in:
Liru Færs
2020-02-11 18:34:45 -05:00
parent 64a44d6c1b
commit 2fe45cb8c2

View File

@@ -1408,7 +1408,8 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
{
log_message = chatHistory_string + ' ' + LLTrans::getString("InvOfferGaveYou") + ' ' + mDesc + LLTrans::getString(".");
chat.mText = log_message;
chat.mURL = LLAvatarActions::getSLURL(mFromID);
if (mFromObject || !mFromGroup)
chat.mURL = mFromGroup ? LLGroupActions::getSLURL(mFromID) : LLAvatarActions::getSLURL(mFromID);
chat.mFromName = mFromName;
LLFloaterChat::addChatHistory(chat);
}
@@ -2617,7 +2618,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
info->mIM = IM_GROUP_NOTICE;
info->mFromID = from_id;
info->mFromGroup = from_group;
info->mFromGroup = true;
info->mFromObject = false;
info->mTransactionID = session_id;
info->mType = (LLAssetType::EType) asset_type;
info->mFolderID = gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(info->mType));