From 304377e015100ea38169106956f43993387e8480 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Fri, 23 Aug 2024 20:25:24 +0800 Subject: Arrival/departure notifs header links to profiles But I haven't been able to make the body message text stay light grey. It's white now. I've tried changing the chat source, chat type and chat style (refer to indra/llui/llchat.h) but I couldn't get just the desired combined styles. --- indra/newview/llvoavatar.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 4aafe1b1fb..24e1cd83db 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -814,7 +814,13 @@ LLVOAvatar::~LLVOAvatar() { if (gSavedSettings.getBOOL("IMShowArrivalsDepartures") && !getFullname().empty()) { - LLNotificationsUI::LLNotificationManager::instance().onChat(LLChat{llformat("%s left.", getFullname().c_str())}, LLSD{}); + LLAvatarName av_name; + LLAvatarNameCache::get(getID(), &av_name); + auto display_name = av_name.getDisplayName(); + LLChat chat{llformat("%s left.", display_name.c_str())}; + chat.mFromName = display_name; + chat.mFromID = getID(); + LLNotificationsUI::LLNotificationManager::instance().onChat(chat, LLSD{}); } if (!mFullyLoaded) { @@ -2478,8 +2484,13 @@ U32 LLVOAvatar::processUpdateMessage(LLMessageSystem *mesgsys, { if (*id_it == getID() && !isSelf()) { - LLNotificationsUI::LLNotificationManager::instance() - .onChat(LLChat{llformat("%s arrived (%.1f m).", getFullname().c_str(), dist_vec(*pos_it, gAgent.getPositionGlobal()))}, LLSD{}); + LLAvatarName av_name; + LLAvatarNameCache::get(getID(), &av_name); + auto display_name = av_name.getDisplayName(); + LLChat chat{llformat("%s arrived (%.1f m).", display_name.c_str(), dist_vec(*pos_it, gAgent.getPositionGlobal()))}; + chat.mFromName = display_name; + chat.mFromID = getID(); + LLNotificationsUI::LLNotificationManager::instance().onChat(chat, LLSD{}); break; } } -- cgit v1.2.3