fix(latest-events): subscribe event cache so LatestEvents subsystem runs #64
No reviewers
Labels
No labels
blocked
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
waiting-on-julian
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jlxq0/matrix-mcp!64
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/event-cache-subscribe"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
One-line fix. matrix-sdk 0.17's
/synchandler only feeds the LatestEvents subsystem whenClient::event_cache().has_subscribed()returns true (seematrix-sdk-0.17/src/sync.rs:362). Without callingevent_cache().subscribe()at client init the entire LatestEvents pool stays empty andRoom::latest_event()returnsLatestEventValue::Nonefor every encrypted room.This is the same subscription Element X performs via its
RoomListServiceat startup.User-visible effect
Before:
```json
{
"display_name": "Nathalie Shen-Picotte",
"unread_notifications": 2,
"latest_event_id": null,
"latest_sender": null,
"latest_origin_server_ts": null
}
```
After: same counts, populated event id / sender / timestamp so the MCP client can render a preview.
Test plan
cargo fmt,cargo clippy --all-targets --all-features -- -D warnings,cargo test --all-features --locked,cargo audit,cargo deny,docker build)🤖 Generated with Claude Code