use diesel::dsl::*;
comment_reply::table
+ .inner_join(comment::table)
.filter(comment_reply::recipient_id.eq(my_person_id))
.filter(comment_reply::read.eq(false))
+ .filter(comment::deleted.eq(false))
+ .filter(comment::removed.eq(false))
.select(count(comment_reply::id))
.first::<i64>(conn)
}
use diesel::dsl::*;
person_mention::table
+ .inner_join(comment::table)
.filter(person_mention::recipient_id.eq(my_person_id))
.filter(person_mention::read.eq(false))
+ .filter(comment::deleted.eq(false))
+ .filter(comment::removed.eq(false))
.select(count(person_mention::id))
.first::<i64>(conn)
}