fixed mention bug
This commit is contained in:
parent
c0a771958c
commit
16193a2e7e
1 changed files with 1 additions and 2 deletions
|
@ -112,8 +112,7 @@ async function handleLol(body, env) {
|
||||||
|
|
||||||
// and similarly with fediverse mentions
|
// and similarly with fediverse mentions
|
||||||
const mentions = content.match(/@[\w\-]+@[\w\-]+\.\S+/)?.filter((v,i,a) => a.indexOf(v) === i)
|
const mentions = content.match(/@[\w\-]+@[\w\-]+\.\S+/)?.filter((v,i,a) => a.indexOf(v) === i)
|
||||||
console.log(mentions)
|
if(mentions) for(let mention of mentions) {
|
||||||
for(let mention of mentions) {
|
|
||||||
try{
|
try{
|
||||||
const handle = mention.substring(1)
|
const handle = mention.substring(1)
|
||||||
const domain = handle.substring(handle.indexOf('@') + 1)
|
const domain = handle.substring(handle.indexOf('@') + 1)
|
||||||
|
|
Loading…
Reference in a new issue