Cache unseen message count
This commit is contained in:
parent
888870b779
commit
453233be9c
2 changed files with 72 additions and 4 deletions
|
|
@ -1224,10 +1224,9 @@ impl EuphRequest {
|
|||
let amount = conn
|
||||
.prepare(
|
||||
"
|
||||
SELECT COUNT(*)
|
||||
FROM euph_msgs
|
||||
SELECT amount
|
||||
FROM euph_unseen_counts
|
||||
WHERE room = ?
|
||||
AND NOT seen
|
||||
",
|
||||
)?
|
||||
.query_row(params![room], |row| row.get(0))?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue