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

@ -77,3 +77,11 @@ func BuildXMPPEventPostKey(xmppEventID string) string {
func BuildXMPPReactionKey(reactionEventID string) string {
return KeyPrefixXMPPReaction + reactionEventID
}
// ExtractChannelIDFromKey extracts the channel ID from a channel mapping key
func ExtractChannelIDFromKey(key string) string {
if len(key) <= len(KeyPrefixChannelMapping) {
return ""
}
return key[len(KeyPrefixChannelMapping):]
}