Procházet zdrojové kódy

Fix encrypted images not showing inline.

Updates #1182 #2554
JC Brand před 3 roky
rodič
revize
f739b9d37d
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      src/headless/utils/url.js

+ 2 - 1
src/headless/utils/url.js

@@ -3,9 +3,10 @@ import log from '@converse/headless/log';
 import { api } from '@converse/headless/core';
 
 function checkTLS (uri) {
+    const uri_protocol = uri.protocol().toLowerCase();
     return (
         window.location.protocol === 'http:' ||
-        (window.location.protocol === 'https:' && uri.protocol().toLowerCase() === 'https')
+        (window.location.protocol === 'https:' && ['http', 'aesgcm'].includes(uri_protocol))
     );
 }