From 908ce3d98677af795b0f0fd61bd7b26f2e79bfaf Mon Sep 17 00:00:00 2001 From: pepper <3782201+rohvani@users.noreply.github.com> Date: Thu, 13 Aug 2026 17:26:06 -0400 Subject: Restore resident links in stitched legacy history Recover missing sender UUIDs for plaintext transcript rows from existing name caches while normalizing stitched history. Preserve explicit ChatService and system IDs so resident headers regain icons and profile actions without scheduling name lookups. Validated with the RelWithDebInfo secondlife-bin build and the LLChatServiceHistoryCore test suite (11 tests). --- indra/newview/llimview.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index da3d2b243a..c6425aa529 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1473,9 +1473,24 @@ void LLIMModel::LLIMSession::replaceHistoricalMessages(const chat_message_list_t chat_message_list_t historical; for (const LLSD& source : history) { + const std::string from = source[LL_IM_FROM].asString(); + LLUUID from_id; + + // Plaintext transcripts store sender names but usually omit UUIDs. Recover + // resident identity from local name caches without scheduling a lookup. + if (source[LL_IM_FROM_ID].isDefined()) + { + from_id = source[LL_IM_FROM_ID].asUUID(); + } + else + { + const std::string legacy_name = gCacheName->buildLegacyName(from); + from_id = LLAvatarNameCache::getInstance()->findIdByName(legacy_name); + } + LLSD message = source; - message["from"] = source[LL_IM_FROM]; - message["from_id"] = source[LL_IM_FROM_ID]; + message["from"] = from; + message["from_id"] = from_id; message["message"] = source[LL_IM_TEXT]; message["time"] = source[LL_IM_TIME]; message["timestamp"] = 0; -- cgit v1.3