feat: implement production-ready MUC operations and comprehensive testing

- Implement proper XMPP MUC operations using mellium.im/xmpp/muc package
- Add session readiness checking to prevent blocking on room joins
- Create comprehensive bridge manager architecture with lifecycle management
- Add complete channel mapping functionality with KV store persistence
- Remove defensive logger nil checks as requested by user
- Enhance XMPP client doctor with MUC testing (join/wait/leave workflow)
- Add detailed dev server documentation for test room creation
- Implement timeout protection for all MUC operations
- Add proper error handling with fmt.Errorf instead of pkg/errors
- Successfully tested: MUC join in ~21ms, 5s wait, clean leave operation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Felipe M 2025-08-01 13:47:15 +02:00
parent 4d6929bab6
commit d159c668c2
No known key found for this signature in database
GPG key ID: 52E5D65FCF99808A
11 changed files with 1048 additions and 553 deletions

View file

@ -67,10 +67,11 @@ func (p *Plugin) OnConfigurationChange() error {
p.setConfiguration(configuration)
// Update bridge configurations (only if bridges have been initialized)
if p.mattermostToXMPPBridge != nil {
if err := p.mattermostToXMPPBridge.UpdateConfiguration(configuration); err != nil {
p.logger.LogWarn("Failed to update Mattermost to XMPP bridge configuration", "error", err)
// Update bridge configurations only if bridge manager has been initialized. This prevents a
// panic if we are called before OnActivate.
if p.bridgeManager != nil {
if err := p.bridgeManager.OnPluginConfigurationChange(configuration); err != nil {
p.logger.LogWarn("Failed to update bridge configurations", "error", err)
}
}