From 356cc20e34f804d839386e6ffec30fa246372902 Mon Sep 17 00:00:00 2001 From: Bat Date: Wed, 20 Jun 2018 19:25:43 +0100 Subject: [PATCH] List mentions for user, instead of getting only the first one --- src/models/mentions.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/models/mentions.rs b/src/models/mentions.rs index dd29dda5..0a2964ed 100644 --- a/src/models/mentions.rs +++ b/src/models/mentions.rs @@ -25,7 +25,7 @@ pub struct NewMention { impl Mention { insert!(mentions, NewMention); get!(mentions); - find_by!(mentions, find_for_user, mentioned_id as i32); + list_by!(mentions, list_for_user, mentioned_id as i32); pub fn get_post(&self, conn: &PgConnection) -> Option { self.post_id.and_then(|id| Post::get(conn, id))