feat: implement XMPP bridge configuration and logger setup

- Add comprehensive XMPP settings schema to plugin.json
- Implement configuration struct with validation and helper methods
- Add configurable username prefix for XMPP users
- Set up logger in Plugin struct following Matrix bridge pattern
- Update KV store constants to use XMPP terminology
- Replace Matrix references with XMPP equivalents in test helpers

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Felipe M 2025-07-31 12:46:45 +02:00
parent 202622f2c4
commit f1a6cb138f
No known key found for this signature in database
GPG key ID: 52E5D65FCF99808A
5 changed files with 135 additions and 451 deletions

View file

@ -21,10 +21,53 @@
"bundle_path": "webapp/dist/main.js"
},
"settings_schema": {
"header": "",
"footer": "",
"settings": [],
"sections": null
"header": "Configure the XMPP bridge connection settings below.",
"footer": "For more information about setting up the XMPP bridge, see the [documentation](https://github.com/mattermost/mattermost-plugin-bridge-xmpp/blob/main/README.md).",
"settings": [
{
"key": "XMPPServerURL",
"display_name": "XMPP Server URL",
"type": "text",
"help_text": "The URL of the XMPP server to connect to (e.g., xmpp.example.com:5222)",
"placeholder": "xmpp.example.com:5222"
},
{
"key": "XMPPUsername",
"display_name": "XMPP Username",
"type": "text",
"help_text": "The username for authenticating with the XMPP server",
"placeholder": "bridge@xmpp.example.com"
},
{
"key": "XMPPPassword",
"display_name": "XMPP Password",
"type": "password",
"help_text": "The password for authenticating with the XMPP server"
},
{
"key": "EnableSync",
"display_name": "Enable Message Synchronization",
"type": "bool",
"help_text": "When enabled, messages will be synchronized between Mattermost and XMPP",
"default": false
},
{
"key": "XMPPUsernamePrefix",
"display_name": "XMPP Username Prefix",
"type": "text",
"help_text": "Prefix for XMPP users in Mattermost (e.g., 'xmpp' creates usernames like 'xmpp:user@domain')",
"placeholder": "xmpp",
"default": "xmpp"
},
{
"key": "XMPPResource",
"display_name": "XMPP Resource",
"type": "text",
"help_text": "XMPP resource identifier for the bridge client",
"placeholder": "mattermost-bridge",
"default": "mattermost-bridge"
}
]
},
"props": {
"pluginctl": {