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:
Trinity Pointard
2018-12-06 15:10:07 +01:00
parent d6e220cc8d
commit 5f059c3e98
3 changed files with 5 additions and 4 deletions
+2 -2
View File
@@ -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);
}