Commit graph

4 commits

Author SHA1 Message Date
7c37953c28
chore: fix lint issues 2025-08-06 18:25:25 +02:00
d9c0215b93
feat: implement comprehensive loop prevention and architecture improvements
- Add comprehensive loop prevention at source level for all bridges:
  - XMPP bridge: Skip messages from own XMPP connection user
  - Mattermost bridge: Skip messages from bot user and remote users
- Remove cache from getOrCreateRemoteUser method for simplified user management
- Improve XMPP client architecture with direct handler delegation:
  - Add SetMessageHandler and GetJID methods to XMPP client
  - Move protocol normalization methods to client level
  - Implement handleIncomingXMPPMessage in XMPP bridge for business logic
- Fix message direction handling in XMPP message handler
- Add remote user invitation to shared channels via InviteRemoteToChannel API
- Clean up unused code and improve code formatting

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-06 17:16:52 +02:00
b1c6f21ea3
feat: implement OnSharedChannelsSyncMsg hook for bidirectional sync
Some checks are pending
ci / plugin-ci (push) Waiting to run
- Add PublishMessage method to BridgeManager interface and implementation
- Implement OnSharedChannelsSyncMsg hook to process Mattermost shared channel sync messages
- Add processSyncPost helper to convert Mattermost posts to bridge messages
- Route sync messages from Mattermost shared channels to XMPP bridge via message bus
- Handle user resolution with fallback to API calls for missing users
- Add comprehensive logging and error handling for sync operations
- Support routing of text messages from shared channels to XMPP rooms

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-05 19:40:12 +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