summaryrefslogtreecommitdiff
path: root/indra/newview/llimview.cpp
diff options
context:
space:
mode:
authorpepper <3782201+rohvani@users.noreply.github.com>2026-08-13 17:26:06 -0400
committerpepper <3782201+rohvani@users.noreply.github.com>2026-08-13 17:26:06 -0400
commit908ce3d98677af795b0f0fd61bd7b26f2e79bfaf (patch)
tree982f17867de9ad6d6d9740c208e83aff234e813f /indra/newview/llimview.cpp
parente122b680a28d3f6b0c5c5ff6fff1b4e3d3b60000 (diff)
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).
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r--indra/newview/llimview.cpp19
1 files changed, 17 insertions, 2 deletions
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;