mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-16 05:36:50 +00:00
Use Result for last_notification_read as zero-default not appropriate.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
1 parent
9c5caa3a5f
commit
1f0cfec5ca
3 files changed
+6
-4
No files matched your search
@@ -50,14 +50,13 @@ pub async fn highlight_count(&self, user_id: &UserId, room_id: &RoomId) -> u64 {
|
||||
|
||||
#[implement(super::Service)]
|
||||
#[tracing::instrument(level = "debug", skip(self), ret(level = "trace"))]
|
||||
pub async fn last_notification_read(&self, user_id: &UserId, room_id: &RoomId) -> u64 {
|
||||
pub async fn last_notification_read(&self, user_id: &UserId, room_id: &RoomId) -> Result<u64> {
|
||||
let key = (room_id, user_id);
|
||||
self.db
|
||||
.roomuserid_lastnotificationread
|
||||
.qry(&key)
|
||||
.await
|
||||
.deserialized()
|
||||
.unwrap_or(0)
|
||||
}
|
||||
|
||||
#[implement(super::Service)]
|
||||
|
||||
Reference in new issue
Block a user