diff options
Diffstat (limited to 'indra/newview/llimprocessing.cpp')
| -rw-r--r-- | indra/newview/llimprocessing.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp index 9fafb2685a..52334a5212 100644 --- a/indra/newview/llimprocessing.cpp +++ b/indra/newview/llimprocessing.cpp @@ -519,6 +519,10 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, break; case IM_NOTHING_SPECIAL: // p2p IM + // Record delivery metadata so live transport can be distinguished from history retrieval. + LL_INFOS("ChatServiceHistory") << "Direct IM received: sender_id=" << from_id + << ", offline=" << (offline == IM_OFFLINE) + << ", timestamp=" << timestamp << ", bytes=" << message.size() << LL_ENDL; // Don't show dialog, just do IM if (!gAgent.isGodlike() && gAgent.inPrelude() @@ -622,6 +626,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, real_name = SYSTEM_FROM; } + // Keep the undecorated body for matching against service history. gIMMgr->addMessage(session_id, from_id, name, @@ -635,7 +640,8 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, region_message, timestamp, LLUUID::null, - real_name); + real_name, + notice_name.empty() ? LLSD(message) : LLSD()); } else { @@ -1454,7 +1460,13 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, for (auto& panel : LLToastNotifyPanel::instance_snapshot()) { const std::string& notification_name = panel.getNotificationName(); - if (notification_name == "OfferFriendship" && panel.isControlPanelEnabled()) + LLNotificationPtr panel_notification = LLNotificationsUtil::find(panel.getID()); + // Only a live actionable offer from this sender makes the packet a duplicate. + if (!panel.isDead() + && notification_name == "OfferFriendship" + && panel_notification + && panel_notification->getPayload()["from_id"].asUUID() == from_id + && panel.isControlPanelEnabled()) { add_notification = false; break; |
