fixed mention bug

This commit is contained in:
Gordon Pedersen 2024-05-24 10:59:33 +10:00
parent c0a771958c
commit 16193a2e7e

View file

@ -112,8 +112,7 @@ async function handleLol(body, env) {
// and similarly with fediverse mentions
const mentions = content.match(/@[\w\-]+@[\w\-]+\.\S+/)?.filter((v,i,a) => a.indexOf(v) === i)
console.log(mentions)
for(let mention of mentions) {
if(mentions) for(let mention of mentions) {
try{
const handle = mention.substring(1)
const domain = handle.substring(handle.indexOf('@') + 1)