Fix issues with tags and mentions
Fix issue where leading @ or # of a mention/hashtag get duplicated Fix issue where normal tags were being overwritten by hashtags
This commit is contained in:
@@ -719,7 +719,7 @@ impl Post {
|
||||
}
|
||||
}
|
||||
|
||||
for ot in old_tags {
|
||||
for ot in old_tags.iter().filter(|t| !t.is_hashtag) {
|
||||
if !tags_name.contains(&ot.tag) {
|
||||
ot.delete(conn);
|
||||
}
|
||||
@@ -756,7 +756,7 @@ impl Post {
|
||||
}
|
||||
}
|
||||
|
||||
for ot in old_tags {
|
||||
for ot in old_tags.into_iter().filter(|t| t.is_hashtag) {
|
||||
if !tags_name.contains(&ot.tag) {
|
||||
ot.delete(conn);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user