Fix encrypted images not showing inline.

Updates #1182 #2554
This commit is contained in:
JC Brand 2021-08-24 20:03:04 +02:00
parent 8eac031047
commit f739b9d37d
1 changed files with 2 additions and 1 deletions

View File

@ -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))
);
}