From 26e03f0c65c0b36705e468687553bbf54cca77be Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Thu, 3 Feb 2022 02:57:29 +0200
Subject: [PATCH] SL-16755 Show alert that download is not supported instead of
 failing silently

---
 indra/newview/llviewermedia.cpp | 1 -
 indra/newview/llvovolume.cpp    | 6 ++++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index da1d029bdb7..b314c788390 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -3212,7 +3212,6 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla
             //unblock media plugin
             const std::vector<std::string> empty_response;
             plugin->sendPickFileResponse(empty_response);
-            LLNotificationsUtil::add("MediaFileDownloadUnsupported");
 		}
 		break;
 
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index ca5305b1693..dd4c326721d 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -71,6 +71,8 @@
 #include "llmediaentry.h"
 #include "llmediadataclient.h"
 #include "llmeshrepository.h"
+#include "llnotifications.h"
+#include "llnotificationsutil.h"
 #include "llagent.h"
 #include "llviewermediafocus.h"
 #include "lldatapacker.h"
@@ -2960,6 +2962,10 @@ void LLVOVolume::mediaEvent(LLViewerMediaImpl *impl, LLPluginClassMedia* plugin,
 			}
 		}
 		break;
+
+        case LLViewerMediaObserver::MEDIA_EVENT_FILE_DOWNLOAD:
+            LLNotificationsUtil::add("MediaFileDownloadUnsupported");
+            break;
 		
 		default:
 		break;
-- 
GitLab