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>
This commit is contained in:
Felipe M 2025-08-04 16:42:59 +02:00
parent 35174c61a2
commit ea1711e94c
No known key found for this signature in database
GPG key ID: 52E5D65FCF99808A
8 changed files with 184 additions and 79 deletions

View file

@ -165,7 +165,7 @@ func testXMPPClient(config *Config) error {
// Test connection health
start = time.Now()
err = client.TestConnection()
err = client.Ping()
if err != nil {
return fmt.Errorf("connection health test failed: %w", err)
}