mattermost-plugin-bridge-xmpp/server/bridge/mattermost
Felipe Martin 8e9d87b176
feat: implement remote user creation for Mattermost bridge
Replace bot-based message posting with remote user creation system:

- Add getOrCreateRemoteUser() method to create/retrieve remote users on-demand
- Use plugin API to find existing users by username/email before creating new ones
- Generate usernames with bridge prefix and emails with bridge.{bridgeID} domain
- Set RemoteId field to BridgeMessage.SourceRemoteID for proper loop prevention
- Cache user mappings to avoid repeated API calls
- Post messages directly as remote users instead of bot with metadata
- Remove unused message formatting since messages are posted as actual users
- Log errors for failed user creation without complex retry logic

This enables authentic user attribution in Mattermost channels while maintaining
existing loop prevention mechanisms through the RemoteId field.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-06 12:29:55 +02:00
..
bridge.go chore: register bridge id 2025-08-06 08:36:51 +02:00
message_handler.go feat: implement remote user creation for Mattermost bridge 2025-08-06 12:29:55 +02:00
user.go feat: restore XMPP bridge to use direct client connection instead of bridge user 2025-08-04 18:04:10 +02:00