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> |
||
---|---|---|
.. | ||
bridge.go | ||
message_handler.go | ||
user.go |