From fd706d7d294b4bda5f6fcd5669f1bdf574bb1054 Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Sat, 1 Jul 2023 13:35:43 +0300 Subject: [PATCH] fix variable --- main.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.mjs b/main.mjs index 016eba9..912af4e 100644 --- a/main.mjs +++ b/main.mjs @@ -58,7 +58,7 @@ function getMessageUrl(msg) { function getTextLink(msg) { const textLinks = (msg.entities ?? []).filter(isTextLink); - return textLinks.length ? links[0].url : null; + return textLinks.length ? textLinks[0].url : null; } function isTextLink(msgEntity) {