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>
This commit is contained in:
Felipe M 2025-08-05 19:40:12 +02:00
parent d21dcd2dd1
commit b1c6f21ea3
No known key found for this signature in database
GPG key ID: 52E5D65FCF99808A
3 changed files with 139 additions and 3 deletions

View file

@ -550,3 +550,14 @@ func (m *BridgeManager) StopMessageRouting() error {
// Stop the message bus
return m.messageBus.Stop()
}
// PublishMessage publishes a message to the message bus for routing to target bridges
func (m *BridgeManager) PublishMessage(msg *model.DirectionalMessage) error {
m.logger.LogDebug("Publishing message to message bus",
"source_bridge", msg.SourceBridge,
"direction", msg.Direction,
"target_bridges", msg.TargetBridges,
"message_id", msg.MessageID)
return m.messageBus.Publish(msg)
}