Skip to content

Fix synchronizing user custom status updates - #144

Merged
hloeung merged 3 commits into
matterbridge:masterfrom
hloeung:custom-user-status
Oct 27, 2026
Merged

hloeung merged 3 commits into
matterbridge:masterfrom
hloeung:custom-user-status

Conversation

@hloeung

@hloeung hloeung commented Oct 27, 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.

🟡 Changes recommended

Unsynchronized profile reads and formatting before timezone updates can cause races and incorrect cached expiry text.

2 open issues
What changed in this PR

This PR synchronizes Mattermost custom statuses with cached user profiles, supporting the related matterircd status-update fix.

Changes:

  • Refresh custom-status cache entries when user profiles change.
  • Add a lock-aware helper for parsing and storing custom statuses.
  • Recover missing formatted statuses from cached profile properties.
File Description
users.go Synchronizes custom statuses during profile updates and adjusts status lookup fallback logic.

Review effort: Balanced

Comment thread users.go Resolved
Comment thread users.go Resolved
@hloeung
hloeung requested a balanced review from Copilot October 27, 2026 10:50
@hloeung hloeung added the bug Something isn't working label Oct 27, 2026

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.

🟡 Changes recommended

Status lookups can restore an explicitly cleared custom status from stale cached profile properties.

1 open issue
2 resolved since last review

Review effort: Balanced

Comment thread users.go Resolved

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.

🟢 Approval recommended

The changes preserve the public API and consistently use the cache mutex, with no identified blocking issues.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@hloeung
hloeung force-pushed the custom-user-status branch from 3ae9de5 to 4789f73 Compare October 27, 2026 11:13
@hloeung
hloeung merged commit dbcc852 into matterbridge:master Oct 27, 2026
1 check passed
@hloeung
hloeung deleted the custom-user-status branch October 27, 2026 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants