cave/activitypub: ignore more weird tags

This commit is contained in:
Astro 2023-10-22 02:35:08 +02:00
parent 6a78081469
commit 6f11e5a1fb

View File

@ -118,12 +118,16 @@ impl Post {
while tag.name.chars().next() == Some('#') { while tag.name.chars().next() == Some('#') {
tag.name.remove(0); tag.name.remove(0);
} }
if tag.name.chars().next() == Some('@') { if let Some(c) = tag.name.chars().next() {
// why do these occur? // check the first letter
None if ['@', ':'].contains(&c) {
} else if tag.name.len() > 0 { // these are weird
Some(tag) None
} else {
Some(tag)
}
} else { } else {
// no first letter
None None
} }
}).collect(), }).collect(),