cave/activitypub: ignore more weird tags
This commit is contained in:
parent
6a78081469
commit
6f11e5a1fb
|
@ -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(),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user