From 6d0a11dc615f03cdce4861f509a15dcdcc74bbb1 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sun, 23 May 2021 00:20:19 +0100 Subject: [PATCH] Iterate MSC2448 support --- api/custom/version.go | 1 - api/r0/upload.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/api/custom/version.go b/api/custom/version.go index d5ac8e6d..f9bd53b9 100644 --- a/api/custom/version.go +++ b/api/custom/version.go @@ -10,7 +10,6 @@ import ( func GetVersion(r *http.Request, rctx rcontext.RequestContext, user api.UserInfo) interface{} { unstableFeatures := make(map[string]bool) - unstableFeatures["xyz.amorgan.blurhash"] = rctx.Config.Features.MSC2448Blurhash.Enabled return &api.DoNotCacheResponse{ Payload: map[string]interface{}{ diff --git a/api/r0/upload.go b/api/r0/upload.go index 4153bca4..63b0170b 100644 --- a/api/r0/upload.go +++ b/api/r0/upload.go @@ -72,7 +72,7 @@ func UploadMedia(r *http.Request, rctx rcontext.RequestContext, user api.UserInf return api.InternalServerError("Unexpected Error") } - if rctx.Config.Features.MSC2448Blurhash.Enabled { + if rctx.Config.Features.MSC2448Blurhash.Enabled && r.URL.Query().Get("xyz.amorgan.generate_blurhash") == "true" { hash, err := info_controller.GetOrCalculateBlurhash(media, rctx) if err != nil { rctx.Log.Warn("Failed to calculate blurhash: " + err.Error()) -- GitLab