summaryrefslogtreecommitdiffstats
path: root/server/src/api/comment.rs
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2020-04-24 10:04:36 -0400
committerDessalines <tyhou13@gmx.com>2020-04-24 10:04:36 -0400
commit66a2c4a2c38fdc90295c0ee2d599e0acecf8ad3f (patch)
tree92d48945d0d0f32d970b875e2ccc8c786e4a565b /server/src/api/comment.rs
parente5497edd5c12b1355c82b224111bf7ce5bb1fd1e (diff)
Some fed fixes.
Diffstat (limited to 'server/src/api/comment.rs')
-rw-r--r--server/src/api/comment.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/src/api/comment.rs b/server/src/api/comment.rs
index 0c6d8e89..eb67d8f2 100644
--- a/server/src/api/comment.rs
+++ b/server/src/api/comment.rs
@@ -122,7 +122,7 @@ impl Perform for Oper<CreateComment> {
let extracted_usernames = extract_usernames(&comment_form.content);
for username_mention in &extracted_usernames {
- if let Ok(mention_user) = User_::read_from_name(&conn, (*username_mention).to_string()) {
+ if let Ok(mention_user) = User_::read_from_name(&conn, username_mention) {
// You can't mention yourself
// At some point, make it so you can't tag the parent creator either
// This can cause two notifications, one for reply and the other for mention
@@ -334,7 +334,7 @@ impl Perform for Oper<EditComment> {
let extracted_usernames = extract_usernames(&comment_form.content);
for username_mention in &extracted_usernames {
- let mention_user = User_::read_from_name(&conn, (*username_mention).to_string());
+ let mention_user = User_::read_from_name(&conn, username_mention);
if mention_user.is_ok() {
let mention_user_id = mention_user?.id;