diff --git a/src/web/contact/mod.rs b/src/web/contact/mod.rs index 8eea1b0..bdeac88 100644 --- a/src/web/contact/mod.rs +++ b/src/web/contact/mod.rs @@ -75,7 +75,7 @@ mod get { let entries: Vec = sqlx::query_as( "select distinct j.id, j.value, j.date from journal_entries j join mentions m on j.id = m.entity_id - where m.entity_type = $1 and (m.url = '/contact/'||$1 or m.url in ( + where m.entity_type = $1 and (m.url = '/contact/'||$2 or m.url in ( select '/group/'||slug from groups where contact_id = $2 ))