Commit graph

9 commits

Author SHA1 Message Date
a76200f4b9
feat: implement XEP-0077 In-Band Registration support
- Add XEPFeatures framework for managing XMPP extension protocols
- Implement complete XEP-0077 In-Band Registration functionality
- Add server capability detection using disco#info queries
- Only initialize XEP features when server supports them
- Add comprehensive XEP-0077 testing to doctor command
- Doctor tests create and delete test users to validate functionality
- Add struct-based XEP management instead of dynamic maps

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-06 19:16:37 +02:00
7c37953c28
chore: fix lint issues 2025-08-06 18:25:25 +02:00
65038fb7a2
feat: restore XMPP bridge to use direct client connection instead of bridge user
Some checks are pending
ci / plugin-ci (push) Waiting to run
- Replace bridgeUser with bridgeClient (*xmppClient.Client) in XMPP bridge
- Update createXMPPClient to return XMPP client with TLS configuration
- Migrate connection, disconnection, and room operations to use bridgeClient
- Update Ping() and RoomExists() methods to use client methods directly
- Maintain bridge-agnostic user management system for additional users
- Fix formatting and import organization across bridge components

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-04 18:04:10 +02:00
ea1711e94c
feat: implement OnSharedChannelsPing hook with active bridge health checking
- Add Ping() method to Bridge interface for active connectivity testing
- Implement XMPP ping using disco#info query to server domain (fast & reliable)
- Implement Mattermost bridge ping using GetServerVersion API call
- Add comprehensive OnSharedChannelsPing hook with proper error handling
- Replace timeout-prone IQ ping with proven disco#info approach
- Add detailed logging for monitoring and debugging ping operations
- Fix doctor command to use new Ping method instead of TestConnection
- Performance: XMPP ping now completes in ~4ms vs previous 5s timeout

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-04 16:42:59 +02:00
a95ca8fb76
feat: implement comprehensive room validation and admin-only command access
- Add RoomExists and GetRoomMapping methods to Bridge interface
- Implement XMPP room existence checking using disco#info queries (XEP-0030)
- Add room validation in BridgeManager to prevent duplicate mappings and invalid rooms
- Enhance XMPP client with CheckRoomExists method and comprehensive logging
- Implement admin-only access control for all bridge commands
- Add user-friendly error messages with actionable troubleshooting steps
- Update doctor command with room existence testing and pre-join validation
- Add SimpleLogger implementation for standalone command usage

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-04 11:29:35 +02:00
5d143808a3
feat: add direct message testing to XMPP doctor command
- Add reusable MessageBody and XMPPMessage structs to xmpp client
- Refactor SendMessage to use shared structs instead of inline definitions
- Add SendDirectMessage method for direct user messaging (type="chat")
- Enhance doctor command with --test-dm flag (enabled by default)
- Add testDirectMessage function that sends test message to admin@localhost
- Update help text, examples, and timing measurements for direct messages

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-01 16:58:02 +02:00
8a8c9af611
feat: implement XMPP message sending and enhance MUC testing
- Implement proper SendMessage function with XML encoding and timeout protection
- Add message sending to MUC test workflow in doctor command
- Test results: join (16.87ms) → send message (75.46µs) → wait (5s) → leave (111.58µs)
- Enhanced doctor logging shows actual message content and comprehensive timing
- Validates complete bidirectional XMPP bridge functionality for production use

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-01 16:03:02 +02:00
d159c668c2
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>
2025-08-01 13:47:15 +02:00
07ff46624d
feat: implement XMPP client and development server infrastructure
## XMPP Client Implementation
- Create XMPP client with mellium.im/xmpp library
- Add SASL Plain authentication with TLS support
- Implement basic connection, ping, and disconnect functionality
- Add TLS certificate verification skip option for development

## Development Server Management
- Add custom makefile targets for XMPP server management
- Implement devserver_start, devserver_stop, devserver_status commands
- Add devserver_logs, devserver_clean, devserver_doctor commands
- Create comprehensive sidecar/README.md with setup instructions

## XMPP Client Doctor Tool
- Create cmd/xmpp-client-doctor diagnostic tool
- Add CLI flags for server configuration with sensible defaults
- Implement verbose logging and connection testing
- Include insecure TLS option for development environments

## Bridge Architecture Foundation
- Create placeholder bridge structs in proper package hierarchy
- Add server/bridge/mattermost and server/bridge/xmpp packages
- Update plugin initialization to create bridge instances
- Maintain clean separation between Mattermost and XMPP concerns

## Dependencies and Configuration
- Add mellium.im/xmpp dependencies to go.mod
- Fix plugin.json password field type validation
- Update README.md with XMPP bridge description and doctor usage
- Add .claude.md to .gitignore for local development notes

All tests passing. Ready for Phase 4 (Bridge Logic) implementation.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-31 13:55:24 +02:00