diff --git a/hive-matrix-mcp/src/handlers.rs b/hive-matrix-mcp/src/handlers.rs index cc78ead5..e2b9e8a2 100644 --- a/hive-matrix-mcp/src/handlers.rs +++ b/hive-matrix-mcp/src/handlers.rs @@ -349,6 +349,7 @@ pub async fn read_room(client: &Client, room_ref: &str, limit: Option) -> /// cached by the matrix-sdk client. Used by the harness to surface /// unread matrix activity in `get_loose_ends` without exposing /// message content. +#[must_use] pub fn unread_count(client: &Client) -> DaemonResponse { let rooms = client .joined_rooms() @@ -363,6 +364,7 @@ pub fn unread_count(client: &Client) -> DaemonResponse { /// one unread notification the last message body is fetched via the /// `/messages` endpoint (best-effort; failures leave `last_body` as /// `None`). Rooms with zero unreads are omitted. +#[must_use] pub async fn collect_unread(client: &Client) -> Vec { use crate::protocol::RoomUnread; let mut result = Vec::new(); @@ -423,6 +425,7 @@ async fn fetch_last_message( /// Return per-room unread summaries. For rooms with exactly one /// unread notification, attempts to include the sender + truncated /// body; rooms with multiple unreads carry only the count. +#[must_use] pub async fn unread_summary(client: &Client) -> DaemonResponse { let rooms = collect_unread(client).await; DaemonResponse::ok(&rooms)