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) {