From 245a5a2814306836d61d6acc9ff852835d624ed9 Mon Sep 17 00:00:00 2001
From: Todd Stinson <stinson@lindenlab.com>
Date: Thu, 24 May 2012 11:39:54 -0700
Subject: [PATCH] EXP-1948: Ensuring that we show the maturity changed
 notification in the case of a teleport failure on the second attempt.

---
 indra/newview/llagent.cpp | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 07a439e6967..1e0ec7f05b9 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -3705,7 +3705,16 @@ void LLAgent::handleTeleportFailed()
 	{
 		mFailedTeleportRequest = mCurrentTeleportRequest;
 	}
-	mIsMaturityRatingChangingDuringTeleport = false;
+	if (mIsMaturityRatingChangingDuringTeleport)
+	{
+		// notify user that the maturity preference has been changed
+		std::string maturityRating = LLViewerRegion::accessToString(mMaturityRatingChange);
+		LLStringUtil::toLower(maturityRating);
+		LLSD args;
+		args["RATING"] = maturityRating;
+		LLNotificationsUtil::add("PreferredMaturityChanged", args);
+		mIsMaturityRatingChangingDuringTeleport = false;
+	}
 }
 
 void LLAgent::teleportRequest(
-- 
GitLab