diff --git a/src/models/posts/mentions.rs b/src/models/posts/mentions.rs index 6fa86ed..78b545d 100644 --- a/src/models/posts/mentions.rs +++ b/src/models/posts/mentions.rs @@ -59,7 +59,7 @@ pub fn replace_mentions( // Replace with a link let url = profile.actor_id(instance_url).unwrap(); format!( - r#"{}@{}"#, + r#"{}@{}"#, caps["space"].to_string(), url, profile.username, @@ -120,8 +120,8 @@ mod tests { let result = replace_mentions(&mention_map, INSTANCE_HOST, INSTANCE_URL, text); let expected_result = concat!( - r#"@user1 "#, - r#"@user2 "#, + r#"@user1 "#, + r#"@user2 "#, r#"sometext @notmention @test@unknown.org"#, ); assert_eq!(result, expected_result);