fix: parse mention even if it's the last thing in the string

This commit is contained in:
trisua 2025-05-11 16:46:32 -04:00
parent 52339e6b98
commit 797ce06eba
2 changed files with 5 additions and 2 deletions

View file

@ -1,5 +1,4 @@
use std::collections::HashMap; use std::collections::HashMap;
use super::*; use super::*;
use crate::cache::Cache; use crate::cache::Cache;
use crate::model::auth::Notification; use crate::model::auth::Notification;

View file

@ -320,7 +320,7 @@ impl User {
} }
if at { if at {
if (char == ' ') && !escape { if char == ' ' {
// reached space, end @ // reached space, end @
at = false; at = false;
@ -339,6 +339,10 @@ impl User {
escape = false; escape = false;
} }
if !buffer.is_empty() {
out.push(buffer);
}
// return // return
out out
} }