mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-25 23:43:18 +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
|
@ -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