From 1104b28758e07f9423cbdb2e6c1a5af4a10f5c22 Mon Sep 17 00:00:00 2001 From: JC Brand Date: Thu, 23 Sep 2021 21:56:32 +0200 Subject: [PATCH] Bugfix. URL is passed in, not object --- src/shared/chat/templates/unfurl.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/chat/templates/unfurl.js b/src/shared/chat/templates/unfurl.js index c59019af1..d09643297 100644 --- a/src/shared/chat/templates/unfurl.js +++ b/src/shared/chat/templates/unfurl.js @@ -12,8 +12,8 @@ function isValidImage (image) { return image && isDomainAllowed(image, 'allowed_image_domains') && isValidURL(image); } -function shouldHideMediaURL (o) { - return isGIFURL(o.url) || isVideoURL(o.url) || isAudioURL(o.url); +function shouldHideMediaURL (url) { + return url && (isGIFURL(url) || isVideoURL(url) || isAudioURL(url)); } const tpl_url_wrapper = (o, wrapped_template) =>