Skip to content

Save custom status expiry time and expire custom status when past expiry time - #128

Merged
hloeung merged 3 commits into
matterbridge:masterfrom
hloeung:custom-user-statuses-until
Sep 24, 2026
Merged

hloeung merged 3 commits into
matterbridge:masterfrom
hloeung:custom-user-statuses-until

Conversation

@hloeung

@hloeung hloeung commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The expiry cleanup has check-then-lock races that can erase concurrently updated statuses.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds expiry-aware caching for custom user statuses, aligning matterclient with the linked matterircd change.

Changes:

  • Stores custom-status expiration timestamps.
  • Lazily removes expired statuses when read.
  • Clears expiration metadata when statuses change.
File Description
users.go Implements expiry storage and cleanup.
matterclient.go Adds and initializes the expiry cache.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread users.go

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The expiry handling is focused, concurrency-safe, and consistently maintains cache state.

Review effort: Balanced
Findings: None

Resolved since last review (1)

@hloeung
hloeung merged commit 68a10d7 into matterbridge:master Sep 24, 2026
1 check passed
@hloeung
hloeung deleted the custom-user-statuses-until branch September 24, 2026 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants