mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-23 11:21:32 +00:00
Check to make sure comment isnt deleted / removed for unread count. (#2472)
- Fixes #2471
This commit is contained in:
parent
ee41654394
commit
3f8c28b26f
2 changed files with 6 additions and 0 deletions
|
@ -154,8 +154,11 @@ impl CommentReplyView {
|
|||
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)
|
||||
}
|
||||
|
|
|
@ -157,8 +157,11 @@ impl PersonMentionView {
|
|||
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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue