summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2023-01-29 16:37:23 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2023-01-29 16:37:23 -0500
commitd609294e2e4335b28a39eeb8746fe59cc55af495 (patch)
tree109bd19dc7c4b2bc399507569580f357c0939ca6 /src
parent3eb98b565f48c26384f0e83e4012fc9b40f1d819 (diff)
downloadSMAPI-d609294e2e4335b28a39eeb8746fe59cc55af495.tar.gz
SMAPI-d609294e2e4335b28a39eeb8746fe59cc55af495.tar.bz2
SMAPI-d609294e2e4335b28a39eeb8746fe59cc55af495.zip
don't allow update manifests before SMAPI 4.0.0 until the feature is released
Diffstat (limited to 'src')
-rw-r--r--src/SMAPI.Web/Controllers/ModsApiController.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/SMAPI.Web/Controllers/ModsApiController.cs b/src/SMAPI.Web/Controllers/ModsApiController.cs
index 2003e25f..f687c7dd 100644
--- a/src/SMAPI.Web/Controllers/ModsApiController.cs
+++ b/src/SMAPI.Web/Controllers/ModsApiController.cs
@@ -147,7 +147,12 @@ namespace StardewModdingAPI.Web.Controllers
foreach (UpdateKey updateKey in updateKeys)
{
// validate update key
- if (!updateKey.LooksValid)
+ if (
+ !updateKey.LooksValid
+#if SMAPI_DEPRECATED
+ || (updateKey.Site == ModSiteKey.UpdateManifest && apiVersion?.IsNewerThan("4.0.0-alpha") != true) // 4.0-alpha feature, don't make available to released mods in case it changes before release
+#endif
+ )
{
errors.Add($"The update key '{updateKey}' isn't in a valid format. It should contain the site key and mod ID like 'Nexus:541', with an optional subkey like 'Nexus:541@subkey'.");
continue;