From fe57d2caf1949abcdb54a35cb610b0eb9d783fd1 Mon Sep 17 00:00:00 2001 From: pepper <3782201+rohvani@users.noreply.github.com> Date: Thu, 10 Sep 2026 12:58:32 -0400 Subject: Consolidate ChatService reconciliation and fix live IM replay Merge archives, plaintext and head previews by service ID and occurrence before applying history limits. Keep loaded history and visible context in ChatService so IM sessions and previews share one composer, with ordinary live appends remaining independent of history replay. Preserve original bodies and send-versus-receipt timing through offline delivery and translation. Match known send times exactly and online receipt times within a rolling 60-second window. Consume eligible occurrences once in chronological order so repeated messages survive reconciliation across minute boundaries. Link offer fallback text to its notification ID and advance the replay cursor for each actual row. Missing or delayed fallback rows can no longer cause the following live IM to be skipped. Dispatch ChatService presentation through the main-loop queue with runtime and current-state checks. This prevents login deadlocks from reentering font initialization in another coroutine. Await deletion invalidation before continuing cleanup so a delayed clear cannot erase later messages. Validated with the Release viewer build, all 34 LLChatServiceHistoryCore cases, and native delivery, archive, offer replay and coroutine-deadlock fixtures. The deadlock fixtures reproduce the original hangs and pass with deferred presentation. --- indra/newview/llnotificationofferhandler.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/llnotificationofferhandler.cpp') diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index dfca370b46..aa875ab247 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -150,6 +150,8 @@ bool LLOfferHandler::processNotification(const LLNotificationPtr& notification, { // log only to file if notif panel can be embedded to IM and IM is opened bool file_only = add_notif_to_im && LLHandlerUtil::isIMFloaterOpened(notification); + // Only a log paired with an inline offer may be hidden during replay. + const LLUUID notification_id = add_notif_to_im ? notification->getID() : LLUUID::null; if ((notification->getName() == "TeleportOffered" || notification->getName() == "TeleportOffered_MaturityExceeded" || notification->getName() == "TeleportOffered_MaturityBlocked")) @@ -157,11 +159,11 @@ bool LLOfferHandler::processNotification(const LLNotificationPtr& notification, boost::regex r("\\s*([^<]*)?\\s*( - )?", boost::regex::perl|boost::regex::icase); std::string stripped_msg = boost::regex_replace(notification->getMessage(), r, ""); - LLHandlerUtil::logToIMP2P(notification->getPayload()["from_id"], stripped_msg,file_only); + LLHandlerUtil::logToIMP2P(notification->getPayload()["from_id"], stripped_msg, file_only, notification_id); } else { - LLHandlerUtil::logToIMP2P(notification, file_only); + LLHandlerUtil::logToIMP2P(notification, file_only, notification_id); } } } -- cgit v1.3