Closed jwilander closed 3 months ago
@AayushChaudhary0001 Would you be open to reviewing this PR?
Note that there is a similar PR being finished up that implements a custom admin component for this https://github.com/Brightscout/mattermost-plugin-welcomebot/pull/15. I think this PR can/should be closed in favor of the custom component implementation. Are you okay with this @jwilander?
Yes, let's close in favour of that.
Closing the PR because of the PR https://github.com/mattermost/mattermost-plugin-welcomebot/pull/126
Summary
I wanted to make this plugin configurable via the System Console, since doing it with mmctl was causing me issues and I wanted to update it often. But, because the plugin manifest settings schema only offers strings and other primitive types as options, I needed the configuration for
WelcomeMessages
to support being either a string or a JSON array. Hence, the customUnmarshalJSON
forConfiguration
.It's not an ideal solution but it works decently well. The other method I considered taking was using the
custom
settings schema type but then I'd have to re-implement the text field component and add a web app component to this plugin, which I didn't want to do. Thoughts?